arrow: [Python] Array equals returns incorrectly if NaNs are in arrays


import numpy as np
import pyarrow as pa

data = [0, 1, np.nan, None, 4]

arr1 = pa.array(data)
arr2 = pa.array(data)

pa.Array.equals(arr1, arr2)

Unsure if this is expected behavior, but in Arrow 0.12.1 this returned True as compared to False in 0.14.1.

Reporter: Keith Kraus / @kkraus14

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-6043. Please see the migration documentation for further details.

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

@honno it gets even worst than that!

>>> table = pa.Table.from_pydict({"foo": [float("nan")]})
>>> table.equals(table)
True
>>> table_1 = pa.Table.from_pydict({"foo": [float("nan")]})
>>> table_2 = pa.Table.from_pydict({"foo": [float("nan")]})
>>> table_1.equals(table_2)
False