Skip to content
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

Avoid calling np.asarray on lazy indexing classes #6874

Merged
merged 59 commits into from
Mar 31, 2023
Merged

Commits on Aug 3, 2022

  1. 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.
    dcherian committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    45cd500 View commit details
    Browse the repository at this point in the history
  2. Rename to short_array_repr; use Variable.data

    instead of always casting to np.asarray
    dcherian committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    9c0350c View commit details
    Browse the repository at this point in the history
  3. Fix Variable.load

    dcherian committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    74afa53 View commit details
    Browse the repository at this point in the history
  4. Make get_array recursive.

    dcherian committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    9de7427 View commit details
    Browse the repository at this point in the history
  5. Some cleanups

    dcherian committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    cc0a653 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    59c7ead View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2aa0830 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1306758 View commit details
    Browse the repository at this point in the history
  9. Rename to get_duck_array

    dcherian authored Aug 3, 2022
    Configuration menu
    Copy the full SHA
    cf67972 View commit details
    Browse the repository at this point in the history
  10. Try without hasattr check

    dcherian authored Aug 3, 2022
    Configuration menu
    Copy the full SHA
    0209900 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    536648a View commit details
    Browse the repository at this point in the history
  12. Add get_duck_array to AbstractArray

    Clean up short_array_repr.
    dcherian committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    f2514c7 View commit details
    Browse the repository at this point in the history
  13. Fix zerodim test

    dcherian committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    3c597d4 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2022

  1. Configuration menu
    Copy the full SHA
    201eeba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cd02a8a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7ef55e0 View commit details
    Browse the repository at this point in the history
  4. Fix BackendArray

    dcherian committed Aug 5, 2022
    Configuration menu
    Copy the full SHA
    4e77fec View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2022

  1. Configuration menu
    Copy the full SHA
    d14c61f View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2022

  1. Configuration menu
    Copy the full SHA
    19af950 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2022

  1. Configuration menu
    Copy the full SHA
    22db817 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2bbcc16 View commit details
    Browse the repository at this point in the history
  3. Add whats-new

    dcherian committed Aug 10, 2022
    Configuration menu
    Copy the full SHA
    ca2a10a View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2022

  1. Configuration menu
    Copy the full SHA
    9256dd0 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2022

  1. Configuration menu
    Copy the full SHA
    906c3b3 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2022

  1. Configuration menu
    Copy the full SHA
    598c201 View commit details
    Browse the repository at this point in the history
  2. Fix merge.

    dcherian committed Nov 27, 2022
    Configuration menu
    Copy the full SHA
    941c643 View commit details
    Browse the repository at this point in the history
  3. Remove another np.asarray

    dcherian committed Nov 27, 2022
    Configuration menu
    Copy the full SHA
    d1127fe View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2023

  1. Avoid np.asarray on __getitem__.

    for BoolTypeArray, NativeEndiannessArray
    dcherian committed Jan 17, 2023
    Configuration menu
    Copy the full SHA
    c0c78a1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9b727e6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    46d98ec View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2023

  1. Revert "Handle Indexing Adapter classes explicitly."

    This reverts commit 46d98ec.
    dcherian committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    b19a24b View commit details
    Browse the repository at this point in the history
  2. Revert "[WIP] ExplicitlyIndexedBackendArray"

    This reverts commit 9b727e6.
    dcherian committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    84f560f View commit details
    Browse the repository at this point in the history
  3. Merge branch 'main' into kvikio

    * main: (41 commits)
      v2023.01.0 whats-new (pydata#7440)
      explain keep_attrs in docstring of apply_ufunc (pydata#7445)
      Add sentence to open_dataset docstring (pydata#7438)
      pin scipy version in doc environment (pydata#7436)
      Improve performance for backend datetime handling (pydata#7374)
      fix typo (pydata#7433)
      Add lazy backend ASV test (pydata#7426)
      Pull Request Labeler - Workaround sync-labels bug (pydata#7431)
      see also : groupby in resample doc and vice-versa (pydata#7425)
      Some alignment optimizations (pydata#7382)
      Make `broadcast` and `concat` work with the Array API (pydata#7387)
      remove `numbagg` and `numba` from the upstream-dev CI (pydata#7416)
      [pre-commit.ci] pre-commit autoupdate (pydata#7402)
      Preserve original dtype when accessing MultiIndex levels (pydata#7393)
      [pre-commit.ci] pre-commit autoupdate (pydata#7389)
      [pre-commit.ci] pre-commit autoupdate (pydata#7360)
      COMPAT: Adjust CFTimeIndex.get_loc for pandas 2.0 deprecation enforcement (pydata#7361)
      Avoid loading entire dataset by getting the nbytes in an array (pydata#7356)
      `keep_attrs` for pad (pydata#7267)
      Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.6.4 (pydata#7375)
      ...
    dcherian committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    426519f View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2023

  1. Configuration menu
    Copy the full SHA
    c4b81bf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d11a3cf View commit details
    Browse the repository at this point in the history
  3. Add test store.

    dcherian committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    c223617 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'main' into kvikio

    * main:
      [skip-cii] Add pyodide update instructions to HOW_TO_RELEASE (pydata#7449)
      [skip-ci] whats-new for next release (pydata#7455)
    dcherian committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    51552d4 View commit details
    Browse the repository at this point in the history
  5. [skip-ci] Update whats-new

    dcherian committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    5f1cf53 View commit details
    Browse the repository at this point in the history
  6. Fix test

    dcherian committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    937d572 View commit details
    Browse the repository at this point in the history
  7. fix mypy?

    dcherian committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    cc7d0b5 View commit details
    Browse the repository at this point in the history
  8. Fix Zarr test

    dcherian committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    1576261 View commit details
    Browse the repository at this point in the history
  9. test the repr too

    dcherian committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    7d8459e View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2023

  1. Configuration menu
    Copy the full SHA
    9815b75 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2023

  1. Configuration menu
    Copy the full SHA
    39e7529 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f304bcb View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2023

  1. Configuration menu
    Copy the full SHA
    6cb1677 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2023

  1. Configuration menu
    Copy the full SHA
    2c7da96 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2023

  1. Apply suggestions from code review

    Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com>
    Co-authored-by: Stephan Hoyer <shoyer@google.com>
    3 people authored Feb 16, 2023
    Configuration menu
    Copy the full SHA
    26d224c View commit details
    Browse the repository at this point in the history
  2. Update xarray/tests/__init__.py

    Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com>
    dcherian and Illviljan authored Feb 16, 2023
    Configuration menu
    Copy the full SHA
    65da209 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2023

  1. Configuration menu
    Copy the full SHA
    0bc1175 View commit details
    Browse the repository at this point in the history
  2. Apply suggestions from code review

    Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com>
    dcherian and Illviljan authored Mar 3, 2023
    Configuration menu
    Copy the full SHA
    8c2d74c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    20c8c81 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2023

  1. Bring back the ugly check

    dcherian committed Mar 4, 2023
    Configuration menu
    Copy the full SHA
    77f7059 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2023

  1. Merge branch 'main' into kvikio

    * main: (40 commits)
      Faq pull request (According to pull request pydata#7604 & issue pydata#1285 (pydata#7638)
      add timeouts for tests (pydata#7657)
      Pull Request Labeler - Undo workaround sync-labels bug (pydata#7667)
      [pre-commit.ci] pre-commit autoupdate (pydata#7651)
      Allow all integer dtypes in `polyval` (pydata#7619)
      [skip-ci] dev whats-new (pydata#7660)
      Redo whats-new for 2023.03.0 (pydata#7659)
      Set copy=False when calling pd.Series (pydata#7642)
      Pin pandas < 2 (pydata#7650)
      Whats-new for release 2023.03.0 (pydata#7643)
      Bump pypa/gh-action-pypi-publish from 1.7.1 to 1.8.1 (pydata#7648)
      Use more descriptive link texts (pydata#7625)
      Fix missing 'dim' argument in _get_nan_block_lengths (pydata#7598)
      Fix `pcolormesh` with str coords (pydata#7612)
      [skip-ci] Fix groupby binary ops benchmarks (pydata#7603)
      Remove incomplete sentence in IO docs (pydata#7631)
      Allow indexing unindexed dimensions using dask arrays (pydata#5873)
      Bump pypa/gh-action-pypi-publish from 1.6.4 to 1.7.1 (pydata#7618)
      [pre-commit.ci] pre-commit autoupdate (pydata#7620)
      add a test for scatter colorbar extend (pydata#7616)
      ...
    dcherian committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    517f195 View commit details
    Browse the repository at this point in the history
  2. Update whats-new

    dcherian committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    5c23bd2 View commit details
    Browse the repository at this point in the history
  3. Fix pre-commit

    dcherian committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    887e1c5 View commit details
    Browse the repository at this point in the history
  4. silence mypy error

    dcherian committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    2557d02 View commit details
    Browse the repository at this point in the history
  5. minimize diff

    dcherian committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    b313258 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2023

  1. Configuration menu
    Copy the full SHA
    cbd030e View commit details
    Browse the repository at this point in the history