code: @Override
      public INDArray pullRows(INDArray source, int sourceDimension, int[] indexes, char order) {
          if (indexes == null || indexes.length < 1)
              throw new IllegalStateException("Indexes can't be null or zero-length");
  
  
          long[] shape;
          if (source.rank() == 1) {
              shape = new long[]{indexes.length};
          } else if (sourceDimension == 1)
              shape = new long[] {indexes.length, source.shape()[sourceDimension]};
          else if (sourceDimension == 0)
              shape = new long[] {source.shape()[sourceDimension], indexes.length};
          else
              throw new UnsupportedOperationException("2D input is expected");
  
          return pullRows(source, Nd4j.createUninitialized(source.dataType(), shape, order), sourceDimension, indexes);
      }
docs: This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexes
  
  @param source          source tensor
  @param sourceDimension dimension of source tensor
  @param indexes         indexes from source array
  @return