[SciPy-User] Scipy views and slicing: Can I get a view-slice from only certain elements of an array?

Francesc Alted faltet@pytables....
Sat Oct 30 05:04:36 CDT 2010


A Saturday 30 October 2010 12:00:05 Francesc Alted escrigué:
> NumPy arrays helps saving space too:
> >>> sys.getsizeof(l)
> 
> 8072
> 
> >>> a.size*a.itemsize
> 
> 8000   # 72 bytes less, not a lot but better than nothing

Ooops.  I forgot to include the numpy headers to this.  So, probably a 
NumPy container is not more efficient (space-wise) than a plain list 
(unless you use shorter integers ;-)

-- 
Francesc Alted


More information about the SciPy-User mailing list