[SciPy-user] changing the default data type of zeros and ones
Thu Oct 11 10:23:39 CDT 2007
I have numpy version 18.104.22.168.
zeros, ones, and empty *all* return float arrays by
--- Ryan Krauss <email@example.com> wrote:
> I have successfully coerced my mechatronics students
> into using
> Scipy/Numpy this semester for signal processing and
> lti type stuff. I
> think it is going fairly well. One common tripping
> point has been
> using the zeros or ones functions to create vectors
> that will later be
> loaded with data. For mechanical engineering
> students coming from a
> Matlab background, the idea that everything isn't a
> floating point
> number seems to be a bit strange. I understand the
> computer science
> arguments for zeros and ones returning integers by
> default, but is
> this something we are willing to consider changing?
> Does the empty function meet this need? What does
> it mean to say that
> the values are uninitialized? Could they really be
> anything? Could
> this cause problems if a value wasn't loaded into
> each slot in the
> When I run empty on my computer, I get a fair number
> of things that
> are really, really small:
> 4.24399162e-312, 3.06953241e-267,
> 3.06956199e-267, -9.94445468e-041,
> -1.31049432e-039, 4.94065646e-324,
> Any thoughts?
> SciPy-user mailing list
-- Lou Pecora, my views are my own.
Pinpoint customers who are looking for what you sell.
More information about the SciPy-user