Re: [Numpy-discussion] TypeError when multiplying float64 and a big integer in Python 3.

2013-06-16 Thread Warren Weckesser
On Sun, Jun 16, 2013 at 12:56 PM, Warren Weckesser <
warren.weckes...@gmail.com> wrote:

> With Python 3.3.2 (64 bit), and numpy master:
>
> >>> import numpy as np
> >>> np.__version__
> '1.8.0.dev-2a5c2c8'
>
> >>> f = np.float64(1.0)
> >>> i = 2**65
> >>> f*i
> Traceback (most recent call last):
>   File "", line 1, in 
> TypeError: unsupported operand type(s) for *: 'numpy.float64' and 'int'
>
> Is this the expected behavior?
>
> The error does not occur with integers that fit in 64 bits:
>
> >>> f*10
> 10.0
>
> It also does not occur in numpy 1.7.1.
>
>

I should have checked the issues on github before mailing the list:
https://github.com/numpy/numpy/issues/3442

Warren



> Warren
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] TypeError when multiplying float64 and a big integer in Python 3.

2013-06-16 Thread Warren Weckesser
With Python 3.3.2 (64 bit), and numpy master:

>>> import numpy as np
>>> np.__version__
'1.8.0.dev-2a5c2c8'

>>> f = np.float64(1.0)
>>> i = 2**65
>>> f*i
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unsupported operand type(s) for *: 'numpy.float64' and 'int'

Is this the expected behavior?

The error does not occur with integers that fit in 64 bits:

>>> f*10
10.0

It also does not occur in numpy 1.7.1.

Warren
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion