[SciPy-user] changing the default data type of zeros and ones
Thu Oct 11 10:34:54 CDT 2007
Sorry, this is a pylab/numpy incompatibility problem. In order to not
spend a lot of time talking about namespaces and such, I teach them to
from scipy import *
from pylab import *
at the beginning of every script and from there it will kind of feel
like Matlab. It is pylab.zeros and pylab.ones that is the problem.
How do I best explain this to my students?
On 10/11/07, Alan G Isaac <firstname.lastname@example.org> wrote:
> On Thu, 11 Oct 2007, Ryan Krauss apparently wrote:
> > I understand the computer science arguments for zeros and
> > ones returning integers by default, but is this something
> > we are willing to consider changing?
> It was changed some time ago.
> Alan Isaac
> >>> import numpy
> >>> numpy.__version__
> >>> numpy.zeros(10)
> array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
> >>> numpy.zeros(10).dtype
> SciPy-user mailing list
More information about the SciPy-user