Skip to content

Commit

Permalink
Add explicit import of numpy.typing in sources, tests and tutorials, …
Browse files Browse the repository at this point in the history
…and require numpy >= 1.21
  • Loading branch information
francesco-ballarin committed Mar 10, 2022
1 parent 475f1cb commit 41e45b1
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions rbnicsx/_backends/online_tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import mpi4py.MPI
import numpy as np
import numpy.typing
import petsc4py.PETSc


Expand Down
1 change: 1 addition & 0 deletions rbnicsx/_backends/proper_orthogonal_decomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import typing

import numpy as np
import numpy.typing
import petsc4py.PETSc
import slepc4py.SLEPc

Expand Down
1 change: 1 addition & 0 deletions rbnicsx/_backends/tensors_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import mpi4py.MPI
import numpy as np
import numpy.typing
import petsc4py.PETSc

from rbnicsx.io import on_rank_zero
Expand Down
1 change: 1 addition & 0 deletions rbnicsx/backends/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import dolfinx.fem
import dolfinx.io
import numpy as np
import numpy.typing
import petsc4py.PETSc

from rbnicsx._backends.export import (
Expand Down
1 change: 1 addition & 0 deletions rbnicsx/backends/mesh_motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import dolfinx.fem
import dolfinx.mesh
import numpy as np
import numpy.typing
import petsc4py.PETSc


Expand Down
1 change: 1 addition & 0 deletions rbnicsx/backends/proper_orthogonal_decomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import dolfinx.fem
import numpy as np
import numpy.typing
import petsc4py.PETSc

from rbnicsx._backends.proper_orthogonal_decomposition import (
Expand Down
1 change: 1 addition & 0 deletions rbnicsx/backends/tensors_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import dolfinx.fem
import mpi4py.MPI
import numpy as np
import numpy.typing

from rbnicsx._backends.tensors_array import TensorsArray as TensorsArrayBase
from rbnicsx.backends.export import export_matrices, export_vectors
Expand Down
1 change: 1 addition & 0 deletions rbnicsx/online/proper_orthogonal_decomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import typing

import numpy as np
import numpy.typing
import petsc4py.PETSc

from rbnicsx._backends.proper_orthogonal_decomposition import (
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ install_requires =
cppimport
mpi4py
multipledispatch
numpy
numpy >= 1.21.0
petsc4py
slepc4py

Expand Down
1 change: 1 addition & 0 deletions tests/unit/backends/test_backends_mesh_motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import dolfinx.mesh
import mpi4py.MPI
import numpy as np
import numpy.typing
import pytest

import rbnicsx.backends
Expand Down
1 change: 1 addition & 0 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import _pytest.compat
import nbvalx.pytest_hooks_unit_tests
import numpy as np
import numpy.typing
import petsc4py.PETSc
import pytest
import scipy.sparse
Expand Down
1 change: 1 addition & 0 deletions tutorials/01_thermal_block.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"import multiphenicsx.io\n",
"import multiphenicsx.mesh\n",
"import numpy as np\n",
"import numpy.typing\n",
"import petsc4py.PETSc\n",
"import plotly.graph_objects as go\n",
"import slepc4py.SLEPc\n",
Expand Down
1 change: 1 addition & 0 deletions tutorials/02_elastic_block.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"import multiphenicsx.io\n",
"import multiphenicsx.mesh\n",
"import numpy as np\n",
"import numpy.typing\n",
"import petsc4py.PETSc\n",
"import ufl"
]
Expand Down
1 change: 1 addition & 0 deletions tutorials/03_hole.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"import multiphenicsx.io\n",
"import multiphenicsx.mesh\n",
"import numpy as np\n",
"import numpy.typing\n",
"import petsc4py.PETSc\n",
"import plotly.graph_objects as go\n",
"import ufl"
Expand Down
1 change: 1 addition & 0 deletions tutorials/04_graetz.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"import multiphenicsx.io\n",
"import multiphenicsx.mesh\n",
"import numpy as np\n",
"import numpy.typing\n",
"import petsc4py.PETSc\n",
"import ufl"
]
Expand Down
1 change: 1 addition & 0 deletions tutorials/05_gaussian.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"import multiphenicsx.io\n",
"import multiphenicsx.mesh\n",
"import numpy as np\n",
"import numpy.typing\n",
"import petsc4py.PETSc\n",
"import ufl"
]
Expand Down
1 change: 1 addition & 0 deletions tutorials/07_nonlinear_elliptic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"import multiphenicsx.io\n",
"import multiphenicsx.mesh\n",
"import numpy as np\n",
"import numpy.typing\n",
"import petsc4py.PETSc\n",
"import ufl"
]
Expand Down
1 change: 1 addition & 0 deletions tutorials/12_stokes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"import multiphenicsx.io\n",
"import multiphenicsx.mesh\n",
"import numpy as np\n",
"import numpy.typing\n",
"import petsc4py.PETSc\n",
"import ufl"
]
Expand Down
1 change: 1 addition & 0 deletions tutorials/17_navier_stokes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"import multiphenicsx.io\n",
"import multiphenicsx.mesh\n",
"import numpy as np\n",
"import numpy.typing\n",
"import petsc4py.PETSc\n",
"import ufl"
]
Expand Down

0 comments on commit 41e45b1

Please sign in to comment.