Skip to content

np.abs(np.nan) causes floating point exception on MIPS #8686

@jcowgill

Description

@jcowgill

Python 2.7.13
NumPy 1.12.0 (Debian package)

As the title says:

$ python -c 'import numpy as np; np.seterr(all="raise"); np.abs(np.nan)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
FloatingPointError: invalid value encountered in absolute

Something is going on in numpy to cause this. Simply running fabs on a NaN in C doesn't set any FP exception flags. I can run things on MIPS machines for you, but I'm not sure where to start in debugging this.

Metadata

Metadata

Assignees

No one assigned

    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