[SciPy-user] unique, sort, sortrows

Gael Varoquaux gael.varoquaux@normalesup....
Sat Jul 26 15:24:00 CDT 2008


Hi David,

It's been a long time since I used Matlab, so I can't really answer all
your questions, however I think I can help you with one:

On Sat, Jul 26, 2008 at 08:06:51PM +0200, David M. Kaplan wrote:
> 4) What is the best equivalent of meshgrid(x,y,z,...) or
> ndgrid(x,y,z...)?  I defined my own function, but is there a built in
> way:

I think you should look at the mgrid and ogrid functions. (See
http://www.scipy.org/Numpy_Example_List ). For many operations, prefer
ogrid, it saves memory and tends to works as easily as mgrid thanks to
broadcasting.

HTH,

Gaël


More information about the SciPy-user mailing list