Skip to content

Remove deprecated use of numpy aliases of built-in types #938

@rly

Description

@rly

Using datajoint 0.13.2 and numpy 1.20.3 or the latest 1.21.1, I get the following deprecation warning repeatedly:

/home/rly/miniconda3/envs/nwb_datajoint/lib/python3.8/site-packages/datajoint/table.py:618: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  if value is None or (attr.numeric and (value == '' or np.isnan(np.float(value)))):

See numpy deprecation info here: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

There are several uses of np.float, np.bool, np.object in the codebase that raise the same deprecation warning above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions