Skip to content

Commit 882aea7

Browse files
committed
fix repeat
1 parent b6af2c7 commit 882aea7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/pint_array/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,11 @@ def manip_fun(x, *args, **kwargs):
305305
for x_i in x[1:]:
306306
magnitude.append(x_i.m_as(units))
307307

308+
if func_str == "repeat" and hasattr(
309+
repeats := (args := list(args))[0], "units"
310+
):
311+
args[0] = repeats.magnitude
312+
308313
if func_str in arbitrary_num_arrays:
309314
magnitude = xp_func(*magnitude, *args, **kwargs)
310315
else:

0 commit comments

Comments
 (0)