How to iterate over indices of a matrix?

Hi,
In Python when we want to iterate over a matrix with an arbitrary dimension, we can use this line of code:

for index in np.ndindex(data.shape[2:]):

in java, in an easy way, we can do it with a determined number of for loop, but the prerequisite is knowledge about the dimension. But in arbitrary dimensions, the algorithm must be more complicated.

Is there any built-in method in ND4J lib for iterating over indices?

P.S: I have already written a piece of code for this purpose if there is not such a method, how can I contribute in ND4J project?