[ 
https://issues.apache.org/jira/browse/ARROW-18432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alenka Frim closed ARROW-18432.
-------------------------------
    Resolution: Duplicate

This topic is not new and was already discussed/is tracked here: 
https://issues.apache.org/jira/browse/ARROW-5295

Will close this and ask to move the questions/discussion to the other issue.

> [Python] Array constructor doesn't support arrow scalars.
> ---------------------------------------------------------
>
>                 Key: ARROW-18432
>                 URL: https://issues.apache.org/jira/browse/ARROW-18432
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>    Affects Versions: 10.0.1
>            Reporter: A. Coady
>            Priority: Minor
>
> {code:python}
> pa.array([pa.scalar(0)])
> ArrowInvalid: Could not convert <pyarrow.Int64Scalar: 0> with type 
> pyarrow.lib.Int64Scalar: did not recognize Python value type when inferring 
> an Arrow data type
> pa.array([pa.scalar(0)], 'int64')
> ArrowInvalid: Could not convert <pyarrow.Int64Scalar: 0> with type 
> pyarrow.lib.Int64Scalar: tried to convert to int64{code}
> It seems odd that the array constructors don't recognize their own scalars.
> In practice, a list of scalars has to be converted with `.as_py()` just to be 
> converted back, and that also loses the type information.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to