private final static short typeToNBytes(final char typecode) {
        switch (typecode) {
        case '1':
            return 1;
        case 's':
            return 2;
        case 'i':
        case 'f':
        case 'F':
            return 4;
        case 'l':
        case 'd':
        case 'D':
            return 8;
        case 'O':
            return 0;
        default:
            throw Py.ValueError("internal error in typeToNBytes");
        }
    }