Skip to content

REGR: indexing issue with numpy scalars on 32-bit linux #4328

Closed
@jreback

Description

@jreback

On numpy master

ONLY on 32-linux versions!

works fine on numpy 1.8.0
found originally here: https://groups.google.com/forum/#!topic/pydata/90QNz8EY74Q
pandas issue: pandas-dev/pandas#6410

INSTALLED VERSIONS
------------------
python: 2.7.3.final.0
python-bits: 32
OS: Linux
OS-release: 3.2.0-23-generic-pae
machine: i686
processor: i686
byteorder: little
LC_ALL: en_US
LANG: en_US
In [21]: import numpy as np

In [22]: np.__version__
Out[22]: '1.9.0.dev-8997167'

In [23]: values = np.array([946684800000000000, 946684800000000000], dtype=np.int64)

In [24]: indexer = np.array([0], dtype=np.int64)

In [25]: value = np.int64(946684800000000000)

In [26]: values[indexer] = value
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-26-bb506aca2290> in <module>()
----> 1 values[indexer] = value

TypeError: Iterator operand 0 dtype could not be cast from dtype('int64') to dtype('int32') according to the rule 'safe'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions