Skip to content

Commit

Permalink
fix torch delegation
Browse files Browse the repository at this point in the history
  • Loading branch information
lucascolley committed Jan 7, 2025
1 parent 6f72daf commit a54357b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/array_api_extra/_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def pad(
pad_width = xp.asarray(pad_width)
pad_width = xp.broadcast_to(pad_width, (x.ndim, 2))
pad_width = xp.flip(pad_width, axis=(0,)).flatten()
return xp.nn.functional.pad(x, (pad_width,), value=constant_values)
return xp.nn.functional.pad(x, tuple(pad_width), value=constant_values)

if _delegate(xp, NUMPY, JAX, CUPY):
return xp.pad(x, pad_width, mode, constant_values=constant_values)
Expand Down

0 comments on commit a54357b

Please sign in to comment.