[ 
https://issues.apache.org/jira/browse/ARROW-13035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17360989#comment-17360989
 ] 

Joris Van den Bossche commented on ARROW-13035:
-----------------------------------------------

The mention of it in ARROW-10423 was I think in the context of a boolean array, 
for which the code already exists (indices of the set bits). 
I assume for other numeric types we would just do a `arr == 0` internally first?

> [C++] Create a compute function returning indices of non-zero values
> --------------------------------------------------------------------
>
>                 Key: ARROW-13035
>                 URL: https://issues.apache.org/jira/browse/ARROW-13035
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Antoine Pitrou
>            Priority: Major
>
> This would be similar to Numpy's {{nonzero}} function:
> [https://numpy.org/doc/stable/reference/generated/numpy.nonzero.html]
> {code:python}
> >>> arr = np.array([4,5,0,6,0,5])
> >>> np.nonzero(arr)
> (array([0, 1, 3, 5]),)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to