nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java
public IComplexNDArray createComplex(float[] data, int[] shape, int[] stride, long offset) {
        //ensure shapes that wind up being scalar end up with the write shape
        if (shape.length == 1 && shape[0] == 0) {
            shape = new int[] {1, 1};
        }
        return createComplex(Nd4j.createBuffer(data), shape, stride, offset, Nd4j.order());
    }
public IComplexNDArray createComplex(float[] data, int[] shape, int[] stride, long offset) {
        //ensure shapes that wind up being scalar end up with the write shape
        if (shape.length == 1 && shape[0] == 0) {
            shape = new int[] {1, 1};
        }
        return createComplex(Nd4j.createBuffer(data), shape, stride, offset, Nd4j.order());
    }
public IComplexNDArray createComplex ( float [ ] data , int [ ] shape , int [ ] stride , long offset ) { //ensure shapes that wind up being scalar end up with the write shape if ( shape . length == 1 && shape [ 0 ] == 0 ) { shape = new int [ ] { 1 , 1 } ; } return createComplex ( Nd4j . createBuffer ( data ) , shape , stride , offset , Nd4j . order ( ) ) ; }
Creates a complex ndarray with the specified shape

@param data   the data to use with the ndarray
@param shape  the shape of the ndarray
@param stride the stride for the ndarray
@param offset the offset of the ndarray
@return the instance
Creates a complex ndarray with the specified shape