Uh oh!
There was an error while loading. Please reload this page.
Revert .oindex and .vindex additions in _ElementwiseFunctionArray, NativeEndiannessArray, and BoolTypeArray classes - #8921
Conversation
…`, `NativeEndiannessArray`, and `BoolTypeArray` classes
andersy005
commented
Apr 8, 2024
@ocraft, when you get a chance do you mind try this branch and confirming whether this fixes your issue in #8909? as @dcherian noted, the minimal verifiable example you provided in #8909 (comment) wasn't reproducible on his end. |
aacbe04 to
721aaf1CompareOk, I started from scratch and created venv with this set of packages (newest version of xarray and scipy with deps): and my example results in error as in #8909 (comment) I got: |
andersy005
commented
Apr 9, 2024
andersy005
commented
Apr 11, 2024
@ocraft, when you get a chance can you confirm this fully addresses the issue on your end? |
ocraft
commented
Apr 11, 2024
I have this error: |
dcherian
commented
Apr 12, 2024
Can we add the reproducer as a test case please |
dcherian
commented
Apr 30, 2024
@andersy005 can we add a test here please? |
andersy005
commented
Apr 30, 2024
i wanted to mention that, as i revisit this issue to add a test, i'm learning the temporary fix may become more complex than initially thought. should we attempt to fix this going forward (as part of the adding support for oindex/vindex to BackendArray) rather than reverting to the previous behavior? |
andersy005
commented
Apr 30, 2024
i can confirm that this issue is fully resolved on In [1]: importxarrayasxr
...: ...: ds=xr.Dataset()
...: ds['A'] =xr.DataArray([[1, 'a'], [2,'b']],dims=['x','y'])
...: ds.to_netcdf('/tmp/test.nc')
...: ds2=xr.open_dataset('/tmp/test.nc')
...: ds2.sel(y=[1]).to_netcdf('/tmp/test.nc')
In [2]: In [2]: xr.show_versions()
INSTALLEDVERSIONS------------------commit: e96e70e04dc21607173d7cdcd9dba2c121d6aab6python: 3.12.3|packagedbyconda-forge| (main, Apr152024, 18:35:20) [Clang16.0.6 ]
python-bits: 64OS: DarwinOS-release: 23.4.0machine: arm64processor: armbyteorder: littleLC_ALL: NoneLANG: en_US.UTF-8LOCALE: ('en_US', 'UTF-8')
libhdf5: Nonelibnetcdf: Nonexarray: 2024.3.1.dev39+g04cca97a0pandas: 2.2.2numpy: 1.26.4scipy: 1.13.0netCDF4: Nonepydap: Noneh5netcdf: Noneh5py: Nonezarr: Nonecftime: Nonenc_time_axis: Noneiris: Nonebottleneck: Nonedask: Nonedistributed: Nonematplotlib: Nonecartopy: Noneseaborn: Nonenumbagg: Nonefsspec: Nonecupy: Nonepint: Nonesparse: Noneflox: Nonenumpy_groupies: Nonesetuptools: 69.5.1pip: 24.0conda: Nonepytest: Nonemypy: NoneIPython: 8.22.2sphinx: None |
* Making decoding arrays lazy too * Add IndexingAdapter mixin class * Cleanup backends some more * Revert "Add IndexingAdapter mixin class" This reverts commit 930f24d. * Fix scipy backend * Add scipy-only CI job xref #8909 * Pin array-api-strict * Fix doctest * Add test for #8909Closes#8909, #8921 * Remove user warning * fix types * Add whats-new * fix types * Fix docs build
As noted in #8909, the use of
.oindexand.vindexproperties in coding/* appears to have broken some backends (e.g. scipy). This PR reverts those changes. We plan to bundle these changes into a separate backends feature branch (see this comment, which will be merged once we are confident about its impact on downstream dependencies.whats-new.rstapi.rst