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

Niranda Perera edited comment on ARROW-9431 at 5/26/21, 4:11 PM:
-----------------------------------------------------------------

[~apitrou] my idea was something like this.
{code:java}
def replace_by_index(to_replace: Array, arr1: Array, arr2: Array) -> Array:
  out = arr1 # copy array
  for i in to_replace:
    out[i] = arr2[i]
  return out {code}
 

Its like an if-else mask, but the mask's set bits are encoded in an array 
ARROW-10640


was (Author: niranda):
[~apitrou] my idea was something like this.
{code:java}
def replace_by_index(to_replace: Array, arr1: Array, arr2: Array) -> Array:
  out = arr1 # copy array
  for i in to_replace:
    out[i] = arr2[i]
  return out {code}

> [C++/Python] Kernel for SetItem(IntegerArray, values)
> -----------------------------------------------------
>
>                 Key: ARROW-9431
>                 URL: https://issues.apache.org/jira/browse/ARROW-9431
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++, Python
>    Affects Versions: 2.0.0
>            Reporter: Uwe Korn
>            Priority: Major
>
> We should have a kernel that allows overriding the values of an array using 
> an integer array as the indexer and a scalar or array of equal length as the 
> values.



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

Reply via email to