On 24 January 2014 23:09, Dinesh Vadhia <dineshbvad...@hotmail.com> wrote:

>  Francesc: Thanks. I looked at numexpr a few years back but it didn't
> support array slicing/indexing.  Has that changed?
>

No, but you can do it yourself.

big_array = np.empty(20000)
piece = big_array[30:-50]
ne.evaluate('sqrt(piece)')

Here, creating "piece" does not increase memory use, as slicing shares the
original data (well, actually, it adds a mere 80 bytes, the overhead of an
array).
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to