I do not know it is right to share with the community about a problem and also share your solution (if it is not, remove my topic)
However, I was trying to rewrite this line of python code in JAVA with the ND4j library.
data[index_odd] = tmp[::-1,:]
It reverses the column’s elements. (in other words, the order of rows) I used this line but apparently it just works when end>begin
INDArrayIndex rev_idx = NDArrayIndex.interval(10, 1);
finally, I solved my problem in a very nasty way. However, if you come with a robust answer, I will appreciate it.
int idx = new int[(int) OBJ_imag.shape()]; for(int i = 0 ; i<OBJ_imag.shape() ; i ++) idx[i] = (int) (OBJ_imag.shape() - i -1); imag.put(indx, OBJ_imag.getRows(idx));