Skip to content

ediff1d handles data type errors badly #11490

@AllenDowney

Description

@AllenDowney

If the to_end or to_begin argument is an invalid type for the array, you don't get an error message, you just get bad results. For example, if you try to put np.nan into an int array:

a = np.array([1, 2, 3])
np.ediff1d(a, np.nan)

You get array([ 1, 1, -9223372036854775808])

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions