diff --git a/pint/facets/numpy/numpy_func.py b/pint/facets/numpy/numpy_func.py index 8b95fb322..2ba2a663a 100644 --- a/pint/facets/numpy/numpy_func.py +++ b/pint/facets/numpy/numpy_func.py @@ -1011,9 +1011,7 @@ def implementation(a, *args, **kwargs): "linalg.norm", ): implement_func("function", func_str, input_units=None, output_unit="sum") -for func_str in ("diff", "ediff1d", - "std", - "nanstd",): +for func_str in ("diff", "ediff1d", "std", "nanstd"): implement_func("function", func_str, input_units=None, output_unit="delta") for func_str in ("gradient",): implement_func("function", func_str, input_units=None, output_unit="delta,div") diff --git a/pint/testsuite/test_numpy.py b/pint/testsuite/test_numpy.py index e4059ccf4..fbe506c26 100644 --- a/pint/testsuite/test_numpy.py +++ b/pint/testsuite/test_numpy.py @@ -858,7 +858,6 @@ def test_var_numpy_func(self): assert np.var(self.q) == 1.25 * self.ureg.m**2 assert np.var(self.q_temperature) == 1.25 * self.ureg.delta_degC**2 - @helpers.requires_array_function_protocol() def test_nanvar_numpy_func(self): helpers.assert_quantity_almost_equal( @@ -879,7 +878,7 @@ def test_std_numpy_func(self): np.std(self.q), 1.11803 * self.ureg.m, rtol=1e-5 ) helpers.assert_quantity_almost_equal( - np.std(self.q_temperature) , 1.11803 * self.ureg.delta_degC, rtol=1e-5 + np.std(self.q_temperature), 1.11803 * self.ureg.delta_degC, rtol=1e-5 ) def test_cumprod(self):