Skip to content

np.datetime64 of lower units are selecting higher units #191

@flexatone

Description

@flexatone

This used to raise but as of NumPy 2.2 these do not raise.

def test_fam_get_dt64_b():
    a1 = np.array(("2023", "1854", "1988"), np.datetime64)
    fam = FrozenAutoMap(list(a1))

    k1 = np.datetime64("1988-01-01")
    with pytest.raises(KeyError):
        _ = fam[k1]

    k2 = np.datetime64("2023-01-01")
    with pytest.raises(KeyError):
        _ = fam[k2]

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