PyMultiarray __neg__(PyMultiarray a) {
        if (!a.isContiguous) { throw Py
                .ValueError("internal __neg__ requires contiguous matrix as argument"); }
        // final int maxI = a.start + PyMultiarray.shapeToNItems(a.dimensions);
        switch (a._typecode) {
        case '1':
            final byte aData1[] = (byte[]) a.data;
            for (int i = 0; i < Array.getLength(a.data); i++) {
                aData1[i] = (byte) (-aData1[i]);
            }
            break;
        case 's':
            final short aDatas[] = (short[]) a.data;
            for (int i = 0; i < Array.getLength(a.data); i++) {
                aDatas[i] = (short) (-aDatas[i]);
            }
            break;
        case 'i':
            final int aDatai[] = (int[]) a.data;
            for (int i = 0; i < Array.getLength(a.data); i++) {
                aDatai[i] = (-aDatai[i]);
            }
            break;
        case 'l':
            final long aDatal[] = (long[]) a.data;
            for (int i = 0; i < Array.getLength(a.data); i++) {
                aDatal[i] = (-aDatal[i]);
            }
            break;
        case 'f':
            final float aDataf[] = (float[]) a.data;
            for (int i = 0; i < Array.getLength(a.data); i++) {
                aDataf[i] = (-aDataf[i]);
            }
            break;
        case 'd':
            final double aDatad[] = (double[]) a.data;
            for (int i = 0; i < Array.getLength(a.data); i++) {
                aDatad[i] = (-aDatad[i]);
            }
            break;
        case 'O':
            final PyObject aDataO[] = (PyObject[]) a.data;
            for (int i = 0; i < Array.getLength(a.data); i++) {
                aDataO[i] = (aDataO[i].__neg__());
            }
            break;
        case 'F':
            a = this.negComplexFloat(a);
            break;
        case 'D':
            a = this.negComplexDouble(a);
            break;
        default:
            throw Py.ValueError("typecode must be in [1silfFdDO]");
        }
        return a;
    }