On Tue, 28 Feb 2006, Steve Schmerler apparently wrote:=20
> In [39]: a =3D arange(0, 0.005, 0.00001); len(a) Out[39]:=20
> 500=20
> In [40]: a =3D arange(0, 0.005, 0.000001); len(a)=20
> Out[40]: 5001=20
> Shouldn't len(a)%10 =3D=3D 0 in these cases?=20
Use numpy.linspace:
linspace(start, stop, num=3D50, endpoint=3DTrue, retstep=3DFalse)
Return evenly spaced numbers.
Return 'num' evenly spaced samples from 'start' to 'stop'. If
'endpoint' is True, the last sample is 'stop'. If 'retstep' is
True then return the step value used.
Cheers,
Alan Isaac
PS http://docs.python.org/tut/node16.html
|