[Numpy-discussion] repeat array in a fake dim without stride_tricks ?

Pierre Haessig pierre.haessig at crans.org
Tue Dec 17 10:41:37 EST 2013


Le 13/12/2013 13:45, Sebastian Berg a écrit :
>> What are the other options for such a repeat ?
> No, I don't think there are any other options. stride tricks are a bit
> hidden, since in many cases it is more dangerous than helping.
> Though with some care you can easily implement such functions using
> stride_tricks.
Thanks !
Since it's in a buried helper function, I could use stride tricks. But
for now I'll stick with broadcast_arrays because I have it working.

Maybe the np.repeat function could be changed to avoid copying (when
possible) ?

best,
Pierre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pierre_haessig.vcf
Type: text/x-vcard
Size: 329 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131217/4fe8a50f/attachment.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 897 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131217/4fe8a50f/attachment.sig>


More information about the NumPy-Discussion mailing list