From dd9b20cab18425024935c025e8bd1fe657e1b32f Mon Sep 17 00:00:00 2001 From: Romain Hugonnet Date: Sat, 17 Feb 2024 12:26:28 +0100 Subject: [PATCH] Linting --- tests/test_spatialstats.py | 4 +++- xdem/coreg/base.py | 2 +- xdem/spatialstats.py | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/test_spatialstats.py b/tests/test_spatialstats.py index 1eda9a1f..ff791318 100644 --- a/tests/test_spatialstats.py +++ b/tests/test_spatialstats.py @@ -72,7 +72,9 @@ def test_nd_binning(self) -> None: """Check that the nd_binning function works adequately and save dataframes to files for later tests""" # Subsampler - indices = gu.raster.subsample_array(self.diff.data.flatten(), subsample=10000, return_indices=True, random_state=42) + indices = gu.raster.subsample_array( + self.diff.data.flatten(), subsample=10000, return_indices=True, random_state=42 + ) # 1D binning, by default will create 10 bins df = xdem.spatialstats.nd_binning( diff --git a/xdem/coreg/base.py b/xdem/coreg/base.py index a2e02185..0ce059c1 100644 --- a/xdem/coreg/base.py +++ b/xdem/coreg/base.py @@ -42,8 +42,8 @@ RasterType, get_array_and_mask, raster, - subsample_array, subdivide_array, + subsample_array, ) from tqdm import tqdm diff --git a/xdem/spatialstats.py b/xdem/spatialstats.py index 42debda3..94a729b8 100644 --- a/xdem/spatialstats.py +++ b/xdem/spatialstats.py @@ -15,7 +15,13 @@ import numba import numpy as np import pandas as pd -from geoutils.raster import Mask, Raster, RasterType, get_array_and_mask, subsample_array +from geoutils.raster import ( + Mask, + Raster, + RasterType, + get_array_and_mask, + subsample_array, +) from geoutils.vector import Vector, VectorType from numpy.typing import ArrayLike from scipy import integrate