From b70044eeaff1b2e762c631fb4d06b7f0dfb9b607 Mon Sep 17 00:00:00 2001 From: Matthew Brett Date: Tue, 18 Jun 2024 14:44:22 +0100 Subject: [PATCH] Run style checker --- nipy/algorithms/diagnostics/tsdiffplot.py | 2 +- nipy/algorithms/statistics/tests/test_intrinsic_volumes.py | 1 + nipy/algorithms/statistics/tests/test_quantile.py | 1 + nipy/algorithms/statistics/tests/test_utils.py | 4 ++-- nipy/algorithms/utils/pca.py | 2 +- nipy/algorithms/utils/tests/test_pca.py | 2 +- nipy/utils/__init__.py | 1 - nipy/utils/tests/test_arrays.py | 3 ++- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/nipy/algorithms/diagnostics/tsdiffplot.py b/nipy/algorithms/diagnostics/tsdiffplot.py index 73ac7db2f..b2c9759c6 100644 --- a/nipy/algorithms/diagnostics/tsdiffplot.py +++ b/nipy/algorithms/diagnostics/tsdiffplot.py @@ -5,8 +5,8 @@ import numpy as np import nipy -from ...utils import deprecate_with_doc +from ...utils import deprecate_with_doc from .timediff import time_slice_diffs diff --git a/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py b/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py index ebca124f4..b8e1a5a2e 100644 --- a/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py +++ b/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py @@ -9,6 +9,7 @@ from numpy.testing import assert_almost_equal, assert_array_equal from nipy.utils import SCTYPES + from .. import intvol diff --git a/nipy/algorithms/statistics/tests/test_quantile.py b/nipy/algorithms/statistics/tests/test_quantile.py index e36b58184..a983f8e88 100644 --- a/nipy/algorithms/statistics/tests/test_quantile.py +++ b/nipy/algorithms/statistics/tests/test_quantile.py @@ -7,6 +7,7 @@ from scipy.stats import scoreatpercentile as sp_percentile from nipy.utils import SCTYPES + from .._quantile import _median, _quantile NUMERIC_TYPES = sum([SCTYPES[t] diff --git a/nipy/algorithms/statistics/tests/test_utils.py b/nipy/algorithms/statistics/tests/test_utils.py index 8e05028f2..878a3e1e8 100644 --- a/nipy/algorithms/statistics/tests/test_utils.py +++ b/nipy/algorithms/statistics/tests/test_utils.py @@ -10,8 +10,8 @@ from scipy.stats import norm from nipy.utils import SCTYPES -from ..utils import (check_cast_bin8, multiple_fast_inv, multiple_mahalanobis, - z_score) + +from ..utils import check_cast_bin8, multiple_fast_inv, multiple_mahalanobis, z_score def test_z_score(): diff --git a/nipy/algorithms/utils/pca.py b/nipy/algorithms/utils/pca.py index d5d17387a..0cdc722aa 100644 --- a/nipy/algorithms/utils/pca.py +++ b/nipy/algorithms/utils/pca.py @@ -17,7 +17,6 @@ import numpy as np import numpy.linalg as npl -from ...utils import SCTYPES from ...core.image.image import rollimg from ...core.reference.coordinate_map import ( AxisError, @@ -25,6 +24,7 @@ io_axis_indices, orth_axes, ) +from ...utils import SCTYPES def pca(data, axis=0, mask=None, ncomp=None, standardize=True, diff --git a/nipy/algorithms/utils/tests/test_pca.py b/nipy/algorithms/utils/tests/test_pca.py index 57d4d5dbe..491d2d2b2 100644 --- a/nipy/algorithms/utils/tests/test_pca.py +++ b/nipy/algorithms/utils/tests/test_pca.py @@ -3,13 +3,13 @@ import numpy as np import pytest -from nipy.utils import SCTYPES from nipy.io.api import load_image from nipy.testing import ( assert_almost_equal, assert_array_almost_equal, funcfile, ) +from nipy.utils import SCTYPES from ..pca import pca diff --git a/nipy/utils/__init__.py b/nipy/utils/__init__.py index 93eac3855..7f966c08d 100644 --- a/nipy/utils/__init__.py +++ b/nipy/utils/__init__.py @@ -11,7 +11,6 @@ import warnings import numpy as np - from nibabel.data import DataError, datasource_or_bomber, make_datasource # Module level datasource instances for convenience diff --git a/nipy/utils/tests/test_arrays.py b/nipy/utils/tests/test_arrays.py index 7fa4a9451..f4726fa29 100644 --- a/nipy/utils/tests/test_arrays.py +++ b/nipy/utils/tests/test_arrays.py @@ -5,9 +5,10 @@ import pytest from numpy.testing import assert_array_almost_equal, assert_array_equal -from ..arrays import strides_from from nipy.utils import SCTYPES +from ..arrays import strides_from + def test_strides_from(): for shape in ((3,), (2,3), (2,3,4), (5,4,3,2)):