Skip to content

Commit

Permalink
Merge pull request #175 from asmeurer/numpy-2.0
Browse files Browse the repository at this point in the history
Fixes for NumPy 2.0
  • Loading branch information
asmeurer authored May 5, 2024
2 parents ff95123 + 3ac2533 commit 901d1f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
set -e
python -m pip install pyflakes pytest pytest-doctestplus hypothesis pytest-cov pytest-flakes packaging
if [[ ${{ matrix.numpy-version }} == 'latest' ]]; then
python -m pip install --pre --upgrade numpy
python -m pip install --upgrade numpy
elif [[ ${{ matrix.numpy-version }} == 'dev' ]]; then
python -m pip install --pre --upgrade --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
else
Expand Down
2 changes: 1 addition & 1 deletion ndindex/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _typecheck(self, idx, shape=None, _copy=True):
def __array_function__(self, func, types, args, kwargs):
return NotImplemented

def __array__(self):
def __array__(self, **kwargs):
raise TypeError(f"Cannot convert {self.__class__.__name__} to an array. Use .array instead.")


Expand Down

0 comments on commit 901d1f3

Please sign in to comment.