Skip to content

Change float datatype #311

Open
Open
@marius-ne

Description

@marius-ne

Hello everybody,

when trying it your great package on the mpii dataset I get this error (when running train.py like described in the README):

Traceback (most recent call last):
  File "/.../tools/train.py", line 223, in <module>
    main()
  File "/.../tools/train.py", line 126, in main
    train_dataset = eval('dataset.'+cfg.DATASET.DATASET)(
  File "/.../tools/../lib/dataset/mpii.py", line 36, in __init__
    self.db = self._get_db()
  File "/.../tools/../lib/dataset/mpii.py", line 55, in _get_db
    c = np.array(a['center'], dtype=np.float)
  File "/usr/local/lib/python3.10/dist-packages/numpy/__init__.py", line 324, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, 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.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'?

I therefore suggest opening a pull-request on this issue to change from np.float to float.

Let me know what you think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions