Skip to content

Silence deprecation warning about np.float usage #1187

Closed

Description

@diptorupd

The following deprecation warning is thrown when running dpex tests

../../../../../nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_algo/__init__.py:27
../../../../../nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_algo/__init__.py:27
  /nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_algo/__init__.py:27: 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
    from dpnp.dpnp_algo.dpnp_algo import *

../../../../../nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_algo/__init__.py:27
../../../../../nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_algo/__init__.py:27
  /nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_algo/__init__.py:27: 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
    from dpnp.dpnp_algo.dpnp_algo import *

../../../../../nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_iface_arraycreation.py:1215
  /nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_iface_arraycreation.py:1215: 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
    def tri(N, M=None, k=0, dtype=numpy.float, **kwargs):

../../../../../nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_iface_types.py:62
  /nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_iface_types.py:62: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    bool = numpy.bool

../../../../../nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_iface_types.py:70
  /nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_iface_types.py:70: 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
    float = numpy.float

../../../../../nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_iface_types.py:74
  /nfs/site/home/diptorup/.conda/envs/dpex-devel/lib/python3.9/site-packages/dpnp/dpnp_iface_types.py:74: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    int = numpy.int

Activity

  1. self-assigned this
    on Sep 21, 2022
  2. antonwolfy commented on Jan 23, 2023

    @antonwolfy
    Contributor

    dpnp gets rid of usage of deprecation type aliases since #1276. It should resolve the issue.

  3. removed their assignment
    on Feb 19, 2023
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