[SciPy-User] indexing array without changing the ndims

Warren Weckesser warren.weckesser@enthought....
Mon Jan 25 21:08:34 CST 2010


Gabriel Gellner wrote:
> I really want an easy way to index an array but not have numpy
> simplify the shape (if you know R I want their drop=FALSE behavior).
>   

For those of us who aren't familiar with R, could you give a concrete 
example of what you want to do? 

Warren

> np.newaxis only seems useful when you need some simple fixes, I want
> something that works without having to check the index to figure out
> which parts of shape need a 1. Any ideas?
>
> thanks,
> Gabriel
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>   



More information about the SciPy-User mailing list