Skip to content

BUG: NaT comparison with numpy array doesn't work element-wise #40722

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

I noticed the following behaviour:

In [43]: np.array([1, 2, 3]) == pd.Timedelta("1 days")
Out[43]: array([False, False, False])

In [44]: np.array([1, 2, 3]) == pd.Timedelta("nat")
Out[44]: False

@jbrockmendel do you know if this is something we control? (it's similar as the numeric/string comparison with numpy, but here the scalar is one defined by pandas)

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtypeMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNumeric OperationsArithmetic, Comparison, and Logical operationsRegressionFunctionality that used to work in a prior pandas version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions