Skip to content
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

DM-42300: Handle day rollover in block parsing #88

Merged
merged 3 commits into from Mar 6, 2024

Conversation

mfisherlevine
Copy link
Contributor

No description provided.

Copy link
Contributor

@TallJimbo TallJimbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I hope it's not a problem that I didn't actually look at the YAML changes.

# same as self.dayObs around the beginning or end of the day, so filter
# with an extra `& (self.data['blockDayObs'] == self.dayObs` when
# getting the relevant rows.
rowsForBlock = self.data[(self.data['blockNum'] == block) & (self.data['blockDayObs'] == self.dayObs)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more verbose, but I like using numpy.logical_and instead of & to avoid any chance of mixing up bitwise vs. logical in the rare scenarios where that matters. But I think I may be in the minority.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I like it - switched 🙂

@mfisherlevine
Copy link
Contributor Author

lol, yeah, never read the yaml changes 😄 There's a ticket to make them binary to stop people even considering it (and save space).

@mfisherlevine mfisherlevine merged commit b1083d7 into main Mar 6, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants