From 0977c3db0df412d2ad59aff610dc7dd500dafb5d Mon Sep 17 00:00:00 2001 From: andrewgsavage Date: Mon, 13 Nov 2023 13:16:17 +0000 Subject: [PATCH] Update pint/facets/numpy/numpy_func.py Co-authored-by: Justus Magin --- pint/facets/numpy/numpy_func.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pint/facets/numpy/numpy_func.py b/pint/facets/numpy/numpy_func.py index 2e37b5f1d..4b55bc76f 100644 --- a/pint/facets/numpy/numpy_func.py +++ b/pint/facets/numpy/numpy_func.py @@ -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":