kszucs commented on a change in pull request #11465:
URL: https://github.com/apache/arrow/pull/11465#discussion_r732293757
##########
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:
The spark integrations tests verify that this resolves the python error,
but we should cover this with unittests.
Deferred to https://issues.apache.org/jira/browse/ARROW-14388
--
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]