dpilger26 / NumCpp

C++ implementation of the Python Numpy library

Home Page:https://dpilger26.github.io/NumCpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update all rows in particular column in NdArray

serhii-vlasiuk opened this issue · comments

I have nc::NdArray like:
[a b c d]
[a1 b1 c1 d1]
[a2 b2 c2 d2]
[a3 b3 c3 d3]

Is it possible to update all rows for first or other columns?
And get the following result:
[a_new b c d]
[a_new1 b1 c1 d1]
[a_new2 b2 c2 d2]
[a_new3 b3 c3 d3]

There are a lot of overloads of the NdArray put() method for inserting values. Specifically you'll want this one

arr.put(arr.rSlice(), 0, values);