-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Enable changing dtypes for decimate #5790
base: main
Are you sure you want to change the base?
Conversation
The mask initialization fails to catch changing dtype (e.g., np.nans from datetime objects). "None" types will not account for these
For decimate, the plot range updates slower than the element range (e.g., whenever the x, y dtypes change from a dynamic map). The element range reflect the current ranges in the new dtype, whereas the self.p.range reflects the previous dtype
Codecov Report
@@ Coverage Diff @@
## main #5790 +/- ##
=======================================
Coverage 88.14% 88.14%
=======================================
Files 307 307
Lines 62850 62850
=======================================
Hits 55401 55401
Misses 7449 7449
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
updating main
@@ -899,8 +899,8 @@ def _process_layer(self, element, key=None): | |||
if element.interface not in column_interfaces: | |||
element = element.clone(tuple(element.columns().values())) | |||
|
|||
xstart, xend = self.p.x_range if self.p.x_range else element.range(0) | |||
ystart, yend = self.p.y_range if self.p.y_range else element.range(1) | |||
xstart, xend = element.range(0) |
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.
This doesn't seem correct, it is important that you can pass in the requested x_range
and y_range
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.
Thank you @chrisbotica! The changes for the nan handling seem good but passing in the x_range and y_range to select on is essential to the operation.
This fixes the issues uncovered in #5789 : Select_mask & decimate fail when dtype changes from numeric to date time. Note that without the workaround in #5789, the two bugs are first hidden by the issue in #5405..
This PR:
np.nan