jorisvandenbossche commented on code in PR #44447:
URL: https://github.com/apache/arrow/pull/44447#discussion_r1876056726


##########
python/pyarrow/array.pxi:
##########
@@ -538,6 +538,51 @@ def repeat(value, size, MemoryPool memory_pool=None):
     return pyarrow_wrap_array(c_array)
 
 
+def mask(indices, length, MemoryPool memory_pool=None):

Review Comment:
   Late response, and the general API looks good, my one suggestion would be to 
use a bit more descriptive name. `mask` could also be interpret in the active 
sense ("mask those values"), and eg pandas has a method with that name that 
work in that sense. Some more explicit options: `create_mask`, `make_mask`, 
`mask_from_indices`, ..
   
   This is essentially the counterpart for `indices_nonzero` I think? (which 
converts a mask into indices) 
   Could maybe mention that in a "See Also" section in the docstring
   



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