arr = np.zeros((6, 6))
def fun(arr): arr.append(1) # this works for arr =  initialization return arr for i in range(0,12): fun(arr)
But append doesn't work for nd array. I want to fill up the elements of the nd array row-wise.
Is there any way to use a python scalar index for the nd array? I could increment this index every time
fun is called and append elements to