[Numpy-discussion] simple problem with arange / roundoff

Christopher Barker Chris.Barker at noaa.gov
Tue Jul 31 13:03:43 EDT 2007


Keith Goodman wrote:
>>> import numpy.matlib as M
>>> M.linspace(-30,30,31)

Tim mentioned it, but just to be clear:

linspace() is so useful that it now lives in the numpy namespace:

 >>> numpy.linspace is numpy.matlib.linspace
True

 >>> numpy.linspace(1,10,10)
array([  1.,   2.,   3.,   4.,   5.,   6.,   7.,   8.,   9.,  10.])
 >>>



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov



More information about the NumPy-Discussion mailing list