Skip to content

BUG: abs with nan on 64-bit floats on 32-bit platform? #7440

Closed

Description

@jreback

occurs also on 1.10.4

[pandas_test] C:\Miniconda3-32\Scripts>python
Python 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 15:36:56) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import numpy as np
>>> np.__version__
'1.9.2'
>>> np.abs(np.array([0,np.nan],dtype='float64'))
__main__:1: RuntimeWarning: invalid value encountered in absolute
array([  0.,  nan])
>>>

you are giving a warning, but not sure why are not handling it.

Activity

  1. njsmith commented on Mar 20, 2016

    @njsmith
    Member

    What's the bug? You expected the same result, but without the warning printed?

  2. jreback commented on Mar 20, 2016

    @jreback
    Author

    doens't show a warning on 64-bit. so the bug is the warning, which seems like its not working.

    [pandas2] C:\>python
    Python 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 14:26:21) [MSC v.1500 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    Anaconda is brought to you by Continuum Analytics.
    Please check out: http://continuum.io/thanks and https://anaconda.org
    >>> import numpy as np
    >>> np.__version__
    '1.10.4'
    >>> np.abs(np.array([0,np.nan],dtype='float64'))
    array([  0.,  nan])
    >>>
    
  3. WarrenWeckesser commented on Sep 24, 2021

    @WarrenWeckesser
    Member

    This issue is over five years old and hasn't had any comments since the day it was created. Can anyone reproduce the spurious warning with a recent release of NumPy on a 32-bit Windows platform with a supported version of Python?

  4. mattip commented on Sep 25, 2025

    @mattip
    Member

    Closing, please reopen if you succeed in reproducing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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