You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
np.pad is not in array API spec, and is unlikely to get there. Still is a sometimes useful function, which is available in some backends (numpy, cupy, jax.numpy) but not others (torch). Thus it'd be great to add it to array-api-extra.
np.pad
is not in array API spec, and is unlikely to get there. Still is a sometimes useful function, which is available in some backends (numpy, cupy, jax.numpy) but not others (torch). Thus it'd be great to add it toarray-api-extra
.Implementing the full set of mode keywords is somewhat tricky, but the most useful one,
mode="constant"
is easy to implement even with pytorch. A ready implementation is available in the scipy PR:https://github.com/scipy/scipy/pull/22122/files#diff-351836adc98d076c1552d17a57c52e6aa8ca43760bae44bea9190e55b4769b7fR873
The torch implementation derives from
torch._numpy
, https://github.com/pytorch/pytorch/blob/main/torch/_numpy/_funcs_impl.py#L2045The version from the scipy PR is under the fold.
The text was updated successfully, but these errors were encountered: