home / github / commits

Menu
  • Search all tables
  • GraphQL API

commits: aa4361dafbf69e5872d8870ce73d082ac9400db0

This data as json

sha message author_date committer_date raw_author raw_committer repo author committer
aa4361dafbf69e5872d8870ce73d082ac9400db0 Avoid calling np.asarray on lazy indexing classes (#6874) * Add get_array to lazy indexing array types. This returns the underlying array type instead of always casting to np.array. This is necessary for Zarr stores where the Zarr Array wraps a cupy array (for example kvikio.zarr.GDSStoree). In that case, we cannot call np.asarray because __array__ is expected to always return a numpy array. We use get_array in Variable.data to make sure we don't load arrays from such GDSStores. * Rename to short_array_repr; use Variable.data instead of always casting to np.asarray * Fix Variable.load * Make get_array recursive. * Some cleanups * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add get_array to PandasIndexingAdaptor * Finish short_array_repr refactoring * Rename to get_duck_array * Try without hasattr check * Return bare array from LazilyIndexedArray.get_duck_array * Add get_duck_array to AbstractArray Clean up short_array_repr. * Fix zerodim test * Fix LazilyVectorizedIndexedArray * Inherit __array__ from ExplicitlyIndexed * Fix InaccessibleArray in tests * Fix BackendArray * reprs Use .data on AbstractArray * Force netCDF and h5netCDF to return arrays * Add whats-new * Add comments; review feedback * Fix merge. * Remove another np.asarray * Avoid np.asarray on __getitem__. for BoolTypeArray, NativeEndiannessArray * [WIP] ExplicitlyIndexedBackendArray * Handle Indexing Adapter classes explicitly. * Revert "Handle Indexing Adapter classes explicitly." This reverts commit 46d98ec7acf9476ef2764d2ecd57fc792ff4ca94. * Revert "[WIP] ExplicitlyIndexedBackendArray" This reverts commit 9b727e6e716beb04e4702b35d8ecfe7b896280ec. * Fix pydap now that NumpyIndexingAdapter does not automatically cast to array * Update xarray/backends/pydap_.py * Add test store. * [skip-ci] Update whats-new * Fix test * fix mypy? * Fix Zarr test * test the repr too * Guard np.asarray for scalars. * Revert casting to arrays in backend * Wrap numpy scalars in Explicitly*Indexed*.get_duck_aray * Apply suggestions from code review Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com> Co-authored-by: Stephan Hoyer <shoyer@google.com> * Update xarray/tests/__init__.py Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com> * Update xarray/core/indexing.py * Apply suggestions from code review Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Bring back the ugly check * Update whats-new * Fix pre-commit * silence mypy error * minimize diff --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com> Co-authored-by: Stephan Hoyer <shoyer@google.com> 2023-03-31T15:15:28Z 2023-03-31T15:15:28Z 0c7e9e762dbfd6554e60c953bf27493047d95109 cd792325681cbad9f663f2879d8b69f1edbb678f 13221727 2448579 19864447
Powered by Datasette · Queries took 1.01ms · About: xarray-datasette