From 559dc3303304f802a43e484e20c463ab77d592e7 Mon Sep 17 00:00:00 2001 From: Aron Mirwald Date: Thu, 20 Jun 2024 14:22:15 +0200 Subject: [PATCH 1/2] typing corrected --- seismostats/plots/basics.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/seismostats/plots/basics.py b/seismostats/plots/basics.py index 6c89507..931b892 100644 --- a/seismostats/plots/basics.py +++ b/seismostats/plots/basics.py @@ -192,7 +192,7 @@ def plot_fmd( def plot_cum_count( cat: pd.DataFrame, ax: plt.Axes | None = None, - mcs: np.ndarray | None = np.array([0]), + mcs: np.ndarray | None = np.ndarray([0]), delta_m: float | None = 0.1, ) -> plt.Axes: """ @@ -319,11 +319,11 @@ def plot_mags_in_time( def dot_size( - magnitudes: np.array, + magnitudes: np.ndarray, smallest: float = 10, largest: float = 200, interpolation_power: int = 1, -) -> np.array: +) -> np.ndarray: """ Auxiliary function, computes dot sizes proportional to a given array of magnitudes. @@ -368,8 +368,8 @@ def dot_size( def reverse_dot_size( sizes: np.ndarray, - min_mag: np.float_, - max_mag: np.float_, + min_mag: float, + max_mag: float, interpolation_power: int = 1, ) -> np.ndarray: """Compute magnitudes proportional to a given array of dot sizes. From 98c69e8d4e28fc792190570f9f97bce923387a7d Mon Sep 17 00:00:00 2001 From: Aron Mirwald Date: Thu, 20 Jun 2024 15:57:20 +0200 Subject: [PATCH 2/2] hinting corrected --- seismostats/plots/basics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seismostats/plots/basics.py b/seismostats/plots/basics.py index 931b892..c7405cd 100644 --- a/seismostats/plots/basics.py +++ b/seismostats/plots/basics.py @@ -192,7 +192,7 @@ def plot_fmd( def plot_cum_count( cat: pd.DataFrame, ax: plt.Axes | None = None, - mcs: np.ndarray | None = np.ndarray([0]), + mcs: np.ndarray = np.array([0]), delta_m: float | None = 0.1, ) -> plt.Axes: """