[Numpy-discussion] Flag for np.tile to use as_strided to reduce memory

Stephan Hoyer shoyer at gmail.com
Fri Jun 19 13:47:18 EDT 2015

On Fri, Jun 19, 2015 at 10:39 AM, Sebastian Berg <sebastian at sipsolutions.net
> wrote:

> No, what tile does cannot be represented that way. If it was possible
> you can achieve the same using `np.broadcast_to` basically, which was
> just added though. There are some other things you can do, like rolling
> window (adding dimensions), maybe some day we should add that (or you
> want to take a shot ;)).
> - Sebastian

The one case where np.tile could be done using stride tricks is if the
dimension you want to repeat has size 1 or currently does not exist.
np.broadcast_to was an attempt to make this stuff less awkward, though it
still requries mixing in transposes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150619/2532c8ca/attachment.html>

More information about the NumPy-Discussion mailing list