final static void mulComplexDouble(int sa, final PyMultiarray a, int sb, final PyMultiarray b, int sr, final PyMultiarray r, final int d) {
        final int dsa = a.strides[d], dsb = b.strides[d], dsr = r.strides[d], finalSr = sr
                + r.dimensions[d] * r.strides[d];
        if (d == r.dimensions.length - 1) {
            final double[] aData = (double[]) a.data, bData = (double[]) b.data;
            final double[] rData = (double[]) r.data;
            for (; sr != finalSr; sa += dsa, sb += dsb, sr += dsr) {
                final double re = aData[sa] * bData[sb] - aData[sa + 1]
                        * bData[sb + 1];
                rData[sr + 1] = aData[sa] * bData[sb + 1] + aData[sa + 1]
                        * bData[sb];
                rData[sr] = re;
            }
        } else {
            for (; sr != finalSr; sa += dsa, sb += dsb, sr += dsr) {
                PyMultiarray.mulComplexDouble(sa, a, sb, b, sr, r, d + 1);
            }
        }
    }