You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "honno (via GitHub)" <gi...@apache.org> on 2023/05/11 11:41:46 UTC

[GitHub] [arrow] honno commented on issue #22446: [Python] Array equals returns incorrectly if NaNs are in arrays

honno commented on issue #22446:
URL: https://github.com/apache/arrow/issues/22446#issuecomment-1543842308

   Worth noting `Table.equals()` treats NaNs as equal on the contrary
   
   ```python
   >>> table = pa.Table.from_pydict({"foo": [float("nan")]})
   >>> table.equals(table)
   True
   ```
   
   and `RecordBatch.equals()` does not
   
   ```python
   >>> record_batch = pa.RecordBatch.from_pydict({"a": [float("nan")]})
   >>> record_batch.equals(record_batch)
   False
   ```
   
   (+1 for an equals option, but also just to say it'd be nice if there was consistency amongst the default calls of `equals()` too).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org