Skip to content

Commit

Permalink
Update pint/facets/numpy/numpy_func.py
Browse files Browse the repository at this point in the history
Co-authored-by: Justus Magin <[email protected]>
  • Loading branch information
andrewgsavage and keewis authored Nov 13, 2023
1 parent 8e6be43 commit 0977c3d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pint/facets/numpy/numpy_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,7 @@ def implementation(*args, **kwargs):
]
):
# the sequence may contain different units, so fall back to element-wise
return np.array(
[func(args[0][i], args[1][i]) for i in range(len(args[0]))],
dtype=object,
)
return np.array([func(*func_args) for func_args in zip(*args)], dtype=object)

first_input_units = _get_first_input_units(args, kwargs)
if input_units == "all_consistent":
Expand Down

0 comments on commit 0977c3d

Please sign in to comment.