diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4438e6a61..603953625 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 }} diff --git a/nutils/__init__.py b/nutils/__init__.py index 9c03bc5fe..6f9aa75e1 100644 --- a/nutils/__init__.py +++ b/nutils/__init__.py @@ -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 diff --git a/nutils/evaluable.py b/nutils/evaluable.py index 93e7a79bf..47a7d21be 100644 --- a/nutils/evaluable.py +++ b/nutils/evaluable.py @@ -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): @@ -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) diff --git a/setup.py b/setup.py index 078e78c78..f9a2feaa4 100644 --- a/setup.py +++ b/setup.py @@ -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'],