Skip to content

Numpy deprecations #2455

@sbrugman

Description

@sbrugman

Numpy deprecated np.bool and other types in 1.20, which expired in the latest release 1.24.

Deprecated name Identical to NumPy scalar type names
numpy.bool bool numpy.bool_
numpy.int int numpy.int_ (default), numpy.int64, or numpy.int32
numpy.float float numpy.float64, numpy.float_, numpy.double (equivalent)
numpy.complex complex numpy.complex128, numpy.complex_, numpy.cdouble(equivalent)
numpy.object object numpy.object_
numpy.str str numpy.str_
numpy.long int numpy.int_ (C long), numpy.longlong (largest integer type)
numpy.unicode str numpy.unicode_

Would be great to be able to automatically flag and fix this. Seen it pass by in multiple projects:
apache/spark#37817
pandas-dev/pandas#39019
dylan-profiler/visions#184
plotly/plotly.py#4010
https://stackoverflow.com/questions/67779374/deprecationwarning-np-bool

Metadata

Metadata

Assignees

No one assigned

    Labels

    ruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions