Re: ENH: More user-friendly way to pad a specific axis

"Juan Nunez-Iglesias" <[email protected]>
Newsgroups gmane.comp.python.numeric.general
Message-ID <[email protected]>
On Thu, 26 Jun 2025, at 4:08 AM, Sebastian Berg wrote:
>> I propose a new, more user-friendly way to pad along a specific axis
>> (or axes): […]
>> 
>> ```python3
>> # before
>> np.pad(array, [(0, 0), (0, 0), (1, 2), (0, 0), (0, 0)])
>> # after
>> np.pad(array, {-3: (1, 2)})
>> ```
>
> So I guess that is a mildly in favor from me when it comes to accepting
> such a change, but I am not sure if it will be quite enough to overcome
> friction of adding new API.

I will add my +1 as being in favour, as it seems like the most natural way to do this. (Trying to reduce the abovementioned friction. 😂)
_______________________________________________
NumPy-Discussion mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/numpy-discussion.python.org
Member address: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.