0

I have an INDArray with shape {7,2,3}. I would like to increase one or more of the dimensions {8,3,4} or {7,3,3}, etc and insert the values into the resized array. I understand that the same array cannot be resized to increase length so I intend to create a bigger array with the same rank and inserting the values into it, but even different Nd4j.put methods expect a scalar only for insertion into the new array and for Nd4j.copy to work the shape of the two arrays need to be the same. How can I go about inserting a smaller array into a bigger array, where the indices for any given value would be the same for both and the newer one only allows me to bring in new indices for the array?

boxed
  • 3,895
  • 2
  • 24
  • 26
user4790067
  • 451
  • 2
  • 6
  • 12

1 Answers1

0

Easiest way is probably getting a subarray out of your big array, and calling subarray_of_big_array.assign(small_array)

raver119
  • 336
  • 1
  • 5