Skip to content

numpy 1.20 deprecates np.bool etc. #1065

@mathause

Description

@mathause

The upcoming numpy 1.20 release will deprecate np.bool and np.float etc., see https://numpy.org/devdocs/release/1.20.0-notes.html#using-the-aliases-of-builtin-types-like-np-int-is-deprecated

You have some usages of this in your codebase that may throw DeprecationWarnings, we see that in the upstream-dev tests of xarray.

E.g.:

totalmask = numpy.zeros(data.shape, numpy.bool)

data = numpy.array(data,numpy.float)

I think the idea is to replace these with bool or np.bool_ (I am never entirely sure what the difference is).

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