danepitkin commented on code in PR #34658:
URL: https://github.com/apache/arrow/pull/34658#discussion_r1172794081


##########
python/pyarrow/array.pxi:
##########
@@ -318,11 +318,29 @@ def array(object obj, type=None, mask=None, size=None, 
from_pandas=None,
             if pandas_api.have_pandas:
                 values, type = pandas_api.compat.get_datetimetz_type(
                     values, obj.dtype, type)
-            result = _ndarray_to_array(values, mask, type, c_from_pandas, safe,
-                                       pool)
+            try:
+                result = _ndarray_to_array(values, mask, type, c_from_pandas, 
safe,
+                                           pool)
+            except ArrowInvalid as err:
+                if "Scalar" in str(err):

Review Comment:
   Relying on a substring within the error message seems a bit hacky. Is there 
any other way to check by chance?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to