diff --git a/src/osyris/core/array.py b/src/osyris/core/array.py index ae744b9..a0158d0 100644 --- a/src/osyris/core/array.py +++ b/src/osyris/core/array.py @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022 Osyris contributors (https://github.com/osyris-project/osyris) import numpy as np -from pint.quantity import Quantity +from pint import Quantity from pint.errors import DimensionalityError from .base import Base from .tools import value_to_string diff --git a/src/osyris/core/vector.py b/src/osyris/core/vector.py index 9251047..9a20fc6 100644 --- a/src/osyris/core/vector.py +++ b/src/osyris/core/vector.py @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022 Osyris contributors (https://github.com/osyris-project/osyris) import numpy as np -from pint.quantity import Quantity +from pint import Quantity from .base import Base from .array import Array from .tools import value_to_string diff --git a/src/osyris/plot/histogram2d.py b/src/osyris/plot/histogram2d.py index 9afa550..982177e 100644 --- a/src/osyris/plot/histogram2d.py +++ b/src/osyris/plot/histogram2d.py @@ -2,7 +2,7 @@ # Copyright (c) 2022 Osyris contributors (https://github.com/osyris-project/osyris) import numpy as np -from pint.quantity import Quantity +from pint import Quantity from typing import Union from ..core import Array, Plot from .render import render diff --git a/src/osyris/plot/map.py b/src/osyris/plot/map.py index 51e4ad6..1687998 100644 --- a/src/osyris/plot/map.py +++ b/src/osyris/plot/map.py @@ -3,7 +3,7 @@ import numpy as np import numpy.ma as ma -from pint.quantity import Quantity +from pint import Quantity from typing import Union from .direction import get_direction from .render import render diff --git a/src/osyris/plot/scatter.py b/src/osyris/plot/scatter.py index 856486b..0164e95 100644 --- a/src/osyris/plot/scatter.py +++ b/src/osyris/plot/scatter.py @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022 Osyris contributors (https://github.com/osyris-project/osyris) -from pint.quantity import Quantity +from pint import Quantity from ..core import Plot, Array from .. import units from .render import render diff --git a/src/osyris/plot/wrappers.py b/src/osyris/plot/wrappers.py index 0266ac5..007aa8f 100644 --- a/src/osyris/plot/wrappers.py +++ b/src/osyris/plot/wrappers.py @@ -8,7 +8,7 @@ from matplotlib.cm import ScalarMappable from matplotlib.collections import PatchCollection import numpy as np -from pint.quantity import Quantity +from pint import Quantity def _add_colorbar(obj, ax, cax=None, label=None): @@ -41,7 +41,7 @@ def quiver(ax, default_args = {"angles": "xy", "pivot": "mid", "zorder": zorder} default_args.update(kwargs) - skips = np.around(np.array(z.shape) * 4.0 / 128.0 / density).astype(np.int) + skips = np.around(np.array(z.shape) * 4.0 / 128.0 / density).astype(int) skip = (slice(None, None, skips[0]), slice(None, None, skips[1])) args = [x[skip[0]], y[skip[1]], z[..., 0][skip], z[..., 1][skip]]