Deprecation warning in numpy >= 1.20 · Issue #515 · astropy/astroplan · GitHub
Skip to content

Deprecation warning in numpy >= 1.20 #515

Description

@thusser

Couldn't find a previous issue about this, so here it is.
With astroplan 0.8 and numpy 1.21.3 I get the following deprecation warning:

2021-12-13 14:42:29,958 [WARNING] warnings.py:109 /usr/local/lib/python3.9/dist-packages/astroplan/scheduling.py:766: 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
  _stride_by = np.int(np.ceil(float(b.duration / time_resolution)))

I guess this means simply replacing np.int with int.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions