commons-numbers-complex-streams/src/main/java/org/apache/commons/numbers/complex/streams/ComplexUtils.java [1127:1148]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (interleavedDim > 1 || interleavedDim < 0) {
            throw new IndexOutOfRangeException(interleavedDim);
        }
        final int w = i.length;
        final int h = i[0].length;
        Complex[][] c;
        if (interleavedDim == 0) {
            c = new Complex[w / 2][h];
            for (int x = 0; x < w / 2; x++) {
                for (int y = 0; y < h; y++) {
                    c[x][y] = Complex.ofCartesian(i[x * 2][y], i[x * 2 + 1][y]);
                }
            }
        } else {
            c = new Complex[w][h / 2];
            for (int x = 0; x < w; x++) {
                for (int y = 0; y < h / 2; y++) {
                    c[x][y] = Complex.ofCartesian(i[x][y * 2], i[x][y * 2 + 1]);
                }
            }
        }
        return c;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



commons-numbers-complex-streams/src/main/java/org/apache/commons/numbers/complex/streams/ComplexUtils.java [1299:1320]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (interleavedDim > 1 || interleavedDim < 0) {
            throw new IndexOutOfRangeException(interleavedDim);
        }
        final int w = i.length;
        final int h = i[0].length;
        Complex[][] c;
        if (interleavedDim == 0) {
            c = new Complex[w / 2][h];
            for (int x = 0; x < w / 2; x++) {
                for (int y = 0; y < h; y++) {
                    c[x][y] = Complex.ofCartesian(i[x * 2][y], i[x * 2 + 1][y]);
                }
            }
        } else {
            c = new Complex[w][h / 2];
            for (int x = 0; x < w; x++) {
                for (int y = 0; y < h / 2; y++) {
                    c[x][y] = Complex.ofCartesian(i[x][y * 2], i[x][y * 2 + 1]);
                }
            }
        }
        return c;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



