[Numpy-discussion] Suggestion: Add the unsqueeze function to numpy
Bruce Southey
bsouthey at gmail.com
Wed Apr 20 14:20:07 EDT 2011
On 04/20/2011 12:24 PM, Yannick Copin wrote:
> <josef.pktd<at> gmail.com> writes:
>> I also proposed this already once.
>>
>> However there is already function in numpy (where I have often
>> problems remembering the name):
>>
>> numpy.expand_dims(a, axis)
> Ah, thanks for the tip, I didn't know this one. The name is unfortunate indeed...
>
> Cheers,
>
> Yannick
>
>
>
If you don't like the name, you can propose a different name via ticket
(probably less likely but numpy 2.0 is around the corner). In the
immediate term, please find time to update the documentation so both
squeeze and expand_dim are added to the respective pages so that it
easier to find - an joint example of squeeze/expand_dim would help here.
Bruce
More information about the NumPy-Discussion
mailing list