Another change in default type of ones and zeros.

Hi All, Originally, ones and zeros defaulted to integer, later the default changed to float, now it looks like it is integer again. In [80]: ones(2).dtype Out[80]: dtype('int32') In [81]: zeros(2).dtype Out[81]: dtype('int32') In [82]: __version__ Out[82]: '1.0.4.dev3880' This could break some code. Did I miss a decision somewhere along the line? Chuck

On 7/7/07, Charles R Harris <charlesr.harris@gmail.com> wrote:
Hi All,
Originally, ones and zeros defaulted to integer, later the default changed to float, now it looks like it is integer again.
In [80]: ones(2).dtype Out[80]: dtype('int32')
In [81]: zeros(2).dtype Out[81]: dtype('int32')
In [82]: __version__ Out[82]: '1.0.4.dev3880'
This could break some code. Did I miss a decision somewhere along the line?
This seems to be a problem with ipython -pylab choosing the old compatibility mode. I thought that was going away. Chuck

On 7/7/07, Charles R Harris <charlesr.harris@gmail.com> wrote:
On 7/7/07, Charles R Harris <charlesr.harris@gmail.com> wrote:
Hi All,
Originally, ones and zeros defaulted to integer, later the default changed to float, now it looks like it is integer again.
In [80]: ones(2).dtype Out[80]: dtype('int32')
In [81]: zeros(2).dtype Out[81]: dtype('int32')
In [82]: __version__ Out[82]: '1.0.4.dev3880'
This could break some code. Did I miss a decision somewhere along the line?
This seems to be a problem with ipython -pylab choosing the old compatibility mode. I thought that was going away.
It depends on whether ipython is invoked as ipython -pylab -p numeric or as ipython -p numeric -pylab The first uses the numeric compatibility layer of MPL, the second gives you numpy. Hmm.... Chuck Chuck
participants (1)
-
Charles R Harris