Skip to content

Commit

Permalink
bump numpy dependency to 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
gertjanvanzwieten committed Mar 11, 2021
1 parent ac733b4 commit 25563c4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
# nprocs
- {os: ubuntu-latest , python-version: 3.8, matrix-backend: numpy, nprocs: 2, numpy-version: latest}
# numpy-version
- {os: ubuntu-latest , python-version: 3.8, matrix-backend: numpy, nprocs: 1, numpy-version: 1.15 }
- {os: ubuntu-latest , python-version: 3.8, matrix-backend: numpy, nprocs: 1, numpy-version: 1.16 }
fail-fast: false
env:
NUTILS_MATRIX: ${{ matrix.matrix-backend }}
Expand Down
2 changes: 1 addition & 1 deletion nutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from distutils.version import LooseVersion

assert sys.version_info >= (3, 5)
assert LooseVersion(numpy.version.version) >= LooseVersion('1.15'), 'nutils requires numpy 1.15 or higher, got {}'.format(numpy.version.version)
assert LooseVersion(numpy.version.version) >= LooseVersion('1.16'), 'nutils requires numpy 1.16 or higher, got {}'.format(numpy.version.version)

version = '7.0a0'
version_name = None
Expand Down
6 changes: 2 additions & 4 deletions nutils/evaluable.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,8 +1198,7 @@ def _unravel(self, axis, shape):

def _determinant(self, axis1, axis2):
value = numpy.transpose(self.value, tuple(i for i in range(self.ndim) if i != axis1 and i != axis2) + (axis1, axis2))
# NOTE: numpy <= 1.12 cannot compute the determinant of an array with shape [...,0,0]
return Constant(numpy.linalg.det(value) if value.shape[-1] else numpy.ones(value.shape[:-2]))
return Constant(numpy.linalg.det(value))

class InsertAxis(Array):

Expand Down Expand Up @@ -1602,8 +1601,7 @@ def _simplified(self):

def evalf(self, arr):
assert arr.ndim == self.ndim+2
# NOTE: numpy <= 1.12 cannot compute the determinant of an array with shape [...,0,0]
return numpy.linalg.det(arr) if arr.shape[-1] else numpy.ones(arr.shape[:-2])
return numpy.linalg.det(arr)

def _derivative(self, var, seen):
Finv = swapaxes(inverse(self.func), -2, -1)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
long_description = long_description,
license = 'MIT',
python_requires = '>=3.5',
install_requires = ['numpy>=1.15', 'treelog>=1.0b5', 'stringly'],
install_requires = ['numpy>=1.16', 'treelog>=1.0b5', 'stringly'],
extras_require = dict(
docs=['Sphinx>=1.6','scipy>=0.13','matplotlib>=1.3'],
matrix_scipy=['scipy>=0.13'],
Expand Down

0 comments on commit 25563c4

Please sign in to comment.