You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (JIRA)" <ji...@apache.org> on 2018/09/24 09:11:00 UTC
[jira] [Resolved] (ARROW-2854) [C++/Python] Casting float NaN to
int should raise an error on safe cast
[ https://issues.apache.org/jira/browse/ARROW-2854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wes McKinney resolved ARROW-2854.
---------------------------------
Resolution: Fixed
Unit test in https://github.com/apache/arrow/commit/cc8d6366a3e9b3bc1470809e7c37a738f9b9dbd6
> [C++/Python] Casting float NaN to int should raise an error on safe cast
> ------------------------------------------------------------------------
>
> Key: ARROW-2854
> URL: https://issues.apache.org/jira/browse/ARROW-2854
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++, Python
> Affects Versions: 0.9.0
> Reporter: Uwe L. Korn
> Assignee: Krisztian Szucs
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.11.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Currently the following code works:
> {code}
> pa.array([np.nan, 1.]).cast(pa.int64())
> {code}
> It produces:
> {code}
> <pyarrow.lib.Int64Array object at 0x111ca6778>
> [
> -9223372036854775808,
> 1
> ]
> {code}
> The expected behaviour should be that it raises.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)