Skip to content

Deprecation warning raised with numpy 2.5.dev in epochs #333

@Cadair

Description

@Cadair

Hi,

I noticed this in the sunpy test suite:

import warnings
warnings.simplefilter("always")

import numpy as np
from cdflib.epochs import CDFepoch


CDFepoch.to_datetime(631377279184000000)

Gives

/home/stuart/Git/sunpy/venv/lib/python3.14/site-packages/cdflib/epochs.py:180: DeprecationWarning: The 'generic' unit for NumPy timedelta is deprecated, and will raise an error in the future. This includes implicit conversion of bare integers (e.g. `+ 1`).Please use a specific unit instead.
  total_datetime = np.array(sum(arrays))
/home/stuart/Git/sunpy/venv/lib/python3.14/site-packages/cdflib/epochs.py:181: DeprecationWarning: The 'generic' unit for NumPy timedelta is deprecated, and will raise an error in the future. This includes implicit conversion of bare integers (e.g. `+ 1`).Please use a specific unit instead.
  total_datetime = np.where(nat_positions, np.datetime64("NaT"), total_datetime)

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