conditionally disable bottleneck#5560
Conversation
|
We use it in other places too (for e.g.): Lines 139 to 147 in c472f8a
I like this idea but we should wait for more input. |
|
Nice! pandas uses To what extent would bottleneck & numba be mutually exclusive? Until everything is implemented in numbagg, I guess they won't be, and we might want separate options. Having a single option would be nicer otherwise. |
|
as discussed in the meeting, we will keep Edit: we also don't have alternatives for functions like |
dcherian
left a comment
There was a problem hiding this comment.
LGTM. I guess you would have to mock bottleneck to properly test this.
Ah this is a good test! with xr.set_options(use_bottleneck=False):
with pytest.raises(...):
dataarray.ffill()IMO it should raise an error so that |
4ce8a6a to
cfeffa4
Compare
|
I'm not sure how to test rolling: monkeypatching Everything else |
dcherian
left a comment
There was a problem hiding this comment.
just a suggestion on the error message.
Can you open a new issue about testing for rolling? I think it is OK to merge without that.
|
Thanks @keewis. We can extend the tests for rolling later. |
* upstream/main: (34 commits) Use same bool validator as other inputs (pydata#5703) conditionally disable bottleneck (pydata#5560) Refactor index vs. coordinate variable(s) (pydata#5636) pre-commit: autoupdate hook versions (pydata#5685) Flexible Indexes: Avoid len(index) in map_blocks (pydata#5670) Speed up _mapping_repr (pydata#5661) update the link to `scipy`'s intersphinx file (pydata#5665) Bump styfle/cancel-workflow-action from 0.9.0 to 0.9.1 (pydata#5663) pre-commit: autoupdate hook versions (pydata#5660) fix the binder environment (pydata#5650) Update api.rst (pydata#5639) Kwargs to rasterio open (pydata#5609) Bump codecov/codecov-action from 1 to 2.0.2 (pydata#5633) new blank whats-new for v0.19.1 v0.19.0 release notes (pydata#5632) remove deprecations scheduled for 0.19 (pydata#5630) Make typing-extensions optional (pydata#5624) Plots get labels from pint arrays (pydata#5561) Add to_numpy() and as_numpy() methods (pydata#5568) pin fsspec (pydata#5627) ...
* upstream/main: (307 commits) Use same bool validator as other inputs (pydata#5703) conditionally disable bottleneck (pydata#5560) Refactor index vs. coordinate variable(s) (pydata#5636) pre-commit: autoupdate hook versions (pydata#5685) Flexible Indexes: Avoid len(index) in map_blocks (pydata#5670) Speed up _mapping_repr (pydata#5661) update the link to `scipy`'s intersphinx file (pydata#5665) Bump styfle/cancel-workflow-action from 0.9.0 to 0.9.1 (pydata#5663) pre-commit: autoupdate hook versions (pydata#5660) fix the binder environment (pydata#5650) Update api.rst (pydata#5639) Kwargs to rasterio open (pydata#5609) Bump codecov/codecov-action from 1 to 2.0.2 (pydata#5633) new blank whats-new for v0.19.1 v0.19.0 release notes (pydata#5632) remove deprecations scheduled for 0.19 (pydata#5630) Make typing-extensions optional (pydata#5624) Plots get labels from pint arrays (pydata#5561) Add to_numpy() and as_numpy() methods (pydata#5568) pin fsspec (pydata#5627) ...
As this came up in #5424 (and because I can't seem to reliably reproduce expected values in #4972 if it is enabled) this adds a option to disable
bottleneck, even if it is installed.In #5424 it was suggested to also allow replacing
bottleneckwithnumbagg. If that's something we want (andnumbaggsupports the operations we need) I can try looking into renaming the new option to something likexr.set_options(accelerate_with="bottleneck")(or something else, if someone has a great idea).Tests are missing because I have no idea how to check that this works (except by mocking bottleneck).
pre-commit run --all-fileswhats-new.rst