You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/12/08 03:20:45 UTC

[GitHub] [arrow] chrisavl commented on a change in pull request #8775: ARROW-10742: [Python] Check mask when creating array from numpy

chrisavl commented on a change in pull request #8775:
URL: https://github.com/apache/arrow/pull/8775#discussion_r538003653



##########
File path: python/pyarrow/array.pxi
##########
@@ -238,6 +238,15 @@ def array(object obj, type=None, mask=None, size=None, from_pandas=None,
                 mask = None if values.mask is np.ma.nomask else values.mask
                 values = values.data
 
+        if mask is not None:
+            if mask.dtype != np.bool_:
+                raise ValueError("Mask must be boolean dtype")

Review comment:
       Done!




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org