-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule