Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Safe cast fails from numpy float64 array with nans to integer #20835

Closed
asfimport opened this issue Jan 14, 2019 · 2 comments
Closed

Comments

@asfimport
Copy link


>>> pa.Array.from_pandas(pd.Series([1, None]), type=pa.int32(), safe=True)
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "pyarrow/array.pxi", line 474, in pyarrow.lib.Array.from_pandas
   File "pyarrow/array.pxi", line 169, in pyarrow.lib.array
   File "pyarrow/array.pxi", line 69, in pyarrow.lib._ndarray_to_array
   File "pyarrow/error.pxi", line 81, in pyarrow.lib.check_status
 pyarrow.lib.ArrowInvalid: Floating point value truncated

Reporter: Bryan Cutler / @BryanCutler
Assignee: Krisztian Szucs / @kszucs

PRs and other links:

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

@asfimport
Copy link
Author

Wes McKinney / @wesm:
Issue resolved by pull request 3395
#3395

@asfimport
Copy link
Author

Bryan Cutler / @BryanCutler:
Thanks all for the quick resolution!

@asfimport asfimport added this to the 0.12.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants