[SciPy-user] mgrid/ogrid...
Robert Kern
robert.kern at gmail.com
Tue Jul 24 15:47:57 EDT 2007
Lin Shao wrote:
> So, is there any difference between N.indices() calls and N.mgrid[]?
Yes!
In [8]: mgrid[0:5:11j]
Out[8]: array([ 0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. ])
In [9]: mgrid[0:5:0.5]
Out[9]: array([ 0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5])
In [11]: mgrid[0:5:0.3]
Out[11]:
array([ 0. , 0.3, 0.6, 0.9, 1.2, 1.5, 1.8, 2.1, 2.4, 2.7, 3. ,
3.3, 3.6, 3.9, 4.2, 4.5, 4.8])
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the SciPy-User
mailing list