-
Notifications
You must be signed in to change notification settings - Fork 10
Basic tests for region index #313
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
Basic tests for region index #313
Conversation
[0, 2, 10, 10, 11, 1], | ||
] | ||
) | ||
nt.assert_array_equal(ds["region_index"], region_index) |
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.
Fails because ds["region_index"] dtype is float 32
Thanks for writing the test @jeromekelleher! It looks like we need to set
|
f921ea7
to
ebf1347
Compare
Wow yes, that does it, thanks! That's bizarre - why does setting the fill_value to None here alter the dtype as seen by Xarray? |
If memory serves (can't find a doc ref) it is because the default is |
But there's no (or at least shouldn't be) any missing chunks here. Should we be explicitly setting the fill_value on every other array as well. |
Let me find the place in xarray that this happens as I've def hit it before, to see if we need to always specify. |
Ok, so without In the zarr backend For non-null fill values, So yeah, we always need a |
Closes #311
I started adding some basic tests and refinements for region index but hit against some baffling behaviour with sgkit/xarray/Dask where the data array changes dtype to float. Have you ever hit anything like this @tomwhite?