[Numpy-discussion] Trimming the np arrays
Vishal Rana
ranavishal at gmail.com
Wed Jun 16 13:30:49 EDT 2010
Robert,
Do I have to repeat it for each element in the list or is there a way I can
iterate the list and do it?
Thanks
Vishal Rana
On Wed, Jun 16, 2010 at 10:23 AM, Robert Kern <robert.kern at gmail.com> wrote:
> On Wed, Jun 16, 2010 at 12:15, Vishal Rana <ranavishal at gmail.com> wrote:
> > Hi,
> > I have a list of np arrays from which I create a np record array, but
> they
> > all of of different length!
> > How can I trim them all in place (for example I want to get last 10
> elements
> > of each)?
>
> x = x[-10:]
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
> -- Umberto Eco
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20100616/c2812722/attachment.html>
More information about the NumPy-Discussion
mailing list