jorisvandenbossche commented on a change in pull request #11465:
URL: https://github.com/apache/arrow/pull/11465#discussion_r732629158



##########
File path: python/pyarrow/array.pxi
##########
@@ -228,9 +228,12 @@ def array(object obj, type=None, mask=None, size=None, 
from_pandas=None,
     if hasattr(obj, '__arrow_array__'):
         return _handle_arrow_array_protocol(obj, type, mask, size)
     elif _is_array_like(obj):
-        if mask is not None and not _is_array_like(mask):
-            raise TypeError("Mask must be a numpy array "
-                            "when converting numpy arrays")
+        if mask is not None:
+            if _is_array_like(mask):
+                mask = get_values(mask, &is_pandas_object)

Review comment:
       Passing a Series or a pandas extension array here should trigger it (I 
suppose that's what @amol- is testing)?




-- 
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