[SciPy-User] indexing array without changing the ndims

Gabriel Gellner ggellner@uoguelph...
Mon Jan 25 21:01:30 CST 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