-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: improve readability #419
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -191,9 +191,9 @@ def UMAPPoints( | |||||||||||||
row_id_start, row_id_stop = 0, len(dataframe) | ||||||||||||||
if dataset_id == DatasetType.PRIMARY: | ||||||||||||||
row_id_start, row_id_stop = row_interval_from_sorted_time_index( | ||||||||||||||
dataframe.index, | ||||||||||||||
start=time_range.start, | ||||||||||||||
end=time_range.end, | ||||||||||||||
time_index=dataframe.index, | ||||||||||||||
time_start=time_range.start, | ||||||||||||||
time_stop=time_range.end, | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
class range(start, stop, step=1) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My 2 cents: I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will stay with const result = endOfHour(new Date(2014, 8, 2, 11, 55))
//=> Tue Sep 02 2014 11:59:59.999
Comment on lines
+195
to
+196
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
to match |
||||||||||||||
) | ||||||||||||||
vector_column = dataset.get_embedding_vector_column(self.name) | ||||||||||||||
for row_id in range(row_id_start, row_id_stop)[:n_samples]: | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the benefit of this? Honest question. The way I see it: It forces me to have more information and reference this type, vs knowing in code that the type is datetime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably tenuous but mostly intended to give names to the return signature (like how you can name return variables in go)
vs