Error while vertically concatenating INDArrays?


I’m trying to vertically append a row vector to an existing INDArray.

int[][] data={
                {1, 0, 0},
                {2, 0, 3},
        INDArray input = Nd4j.createFromArray(data[0]);
        INDArray output = Nd4j.createFromArray(data[1]);
        input = Nd4j.vstack(input, output);
        input = Nd4j.vstack(input, output);

The program crashes on the last line of code, with the following error:

CONCAT op: all input arrays must have the same rank !

Why is the rank of input arrays important while concatenating vertically? Shouldn’t they just have the same column dimension?

Using Nd4j.concat(1, input, output) also doesn’t work, with the error being

CONCAT op: input axis must be in range [0, 0], but got 1 instead!

I apologize if I’m missing something very obvious…