Skip to content

numpy 1.24.3 support for comparisons with pd.Timedelta and pd.Timestamp #662

Closed
@Dr-Irv

Description

@Dr-Irv

I did a poetry update and my environment got updated to numpy 1.24.3. In that version of numpy, comparisons of numpy timedelta or timestamp objects with pandas Timedelta and Timestamp objects now return a bool instead of np.bool_, when the numpy object is on the LHS of the comparison. The type declarations didn't change - they still return Any.

So we need to do the following:

  1. Update the pyproject.toml to point to numpy 1.24.3
  2. Update tests of the following form in test_scalars.py to have check compare the result to bool instead of np.bool_:
check(assert_type(c_timedelta64 > td, Any), np.bool_)

I think there are about 14 such tests.

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