[SciPy-User] indexing array without changing the ndims

Gabriel Gellner ggellner at uoguelph.ca
Mon Jan 25 22:01:30 EST 2010


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).
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



More information about the SciPy-User mailing list