|
From: Mark B. <ma...@gm...> - 2007-04-24 07:32:07
|
Hello list - I am confused about the part of numpy that pylab imports. Apparently, pylab imports 'zeros', but not the 'zeros' from numpy, as it returns integers by default, rather than floats. The same holds for 'ones' and 'empty'. Example: >>> from pylab import * >>> zeros(3) array([0, 0, 0]) >>> from numpy import * >>> zeros(3) array([ 0., 0., 0.]) Can this be fixed? Any explanation how this happens? Pylab just imports part of numpy, doesn't it? Thanks, Mark |