Skip to content

np.nan incorrectly casted into datetime on powerpc, leading to failing tests of pandas #8325

@yarikoptic

Description

@yarikoptic

originally detected while building fresh pandas for debian [1], and then verified with current master of numpy:

(sid_powerpc-dchroot)yoh@partch:~/numpy$ python -c 'import numpy as np; print(np.array([np.nan]).astype("M8[ns]")); print np.__version__'; git describe --tags

['2262-04-10T00:12:45.292707840']
1.13.0.dev0+a4dca24
pre-removal-numpybook-3581-ga4dca24

expected result (e.g. on amd64 box):

$> python -c 'import numpy as np; print(np.array([np.nan]).astype("M8[ns]")); print np.__version__'; 
['NaT']
1.11.2

[1] https://buildd.debian.org/status/fetch.php?pkg=pandas&arch=powerpc&ver=0.19.1-2&stamp=1480352140

edit 1: issue is not new (debian jessie/stable):

(jessie_powerpc-dchroot)yoh@partch:~$ python -c 'import numpy as np; print(np.array([np.nan]).astype("M8[ns]")); print np.__version__'
['2262-04-10T00:12:45.292707840+0000']
1.8.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions