pitrou commented on code in PR #44447: URL: https://github.com/apache/arrow/pull/44447#discussion_r1807817010
########## 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): + """ + Create a boolean Array instance where specific indices are marked as True. + + Parameters + ---------- + indices : list[int] Review Comment: At the C++ level you're right, at the Python level we allow implicit conversion if it's non-ambiguous: ```python >>> pc.list_flatten([[1, 2, 3], None, [4, None, 5]]) <pyarrow.lib.Int64Array object at 0x7f37d6454340> [ 1, 2, 3, 4, null, 5 ] ``` @felipecrv What do you think about this? Should it be a compute kernel or rather a general facility? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org