Skip to content

Commit

Permalink
reorder test for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgsavage committed Oct 25, 2023
1 parent d42da07 commit b41a096
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pint/facets/numpy/numpy_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
):
Expand Down
3 changes: 2 additions & 1 deletion pint/testsuite/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit b41a096

Please sign in to comment.