diff --git a/pint/facets/numpy/numpy_func.py b/pint/facets/numpy/numpy_func.py index bbe149b05..2e37b5f1d 100644 --- a/pint/facets/numpy/numpy_func.py +++ b/pint/facets/numpy/numpy_func.py @@ -286,7 +286,7 @@ def implement_func(func_type, func_str, input_units=None, output_unit=None): def implementation(*args, **kwargs): if func_str in ["multiply", "true_divide", "divide", "floor_divide"] and any( [ - _is_sequence_with_quantity_elements(arg) and not _is_quantity(arg) + not _is_quantity(arg) and _is_sequence_with_quantity_elements(arg) for arg in args ] ): diff --git a/pint/testsuite/test_issues.py b/pint/testsuite/test_issues.py index e3ac956c1..d142e53f8 100644 --- a/pint/testsuite/test_issues.py +++ b/pint/testsuite/test_issues.py @@ -900,7 +900,7 @@ def test_issue1674(self, module_registry): helpers.assert_quantity_equal( arr_of_q * q_arr, np.array([Q_(2, "m^2"), Q_(8, "m s")], dtype="object") ) - + @helpers.requires_babel() def test_issue_1400(self, sess_registry): q1 = 3 * sess_registry.W @@ -961,6 +961,7 @@ def test_issue1614(self, module_registry): assert q2_u.magnitude.std_dev == m2.error assert q2_u.magnitude.std_dev == u2.std_dev + if np is not None: @pytest.mark.filterwarnings("ignore::pint.UnitStrippedWarning")