private final static int _seqToObjects(final PyObject seq, final PyObject[] flat, int offset) {
        int items;
        if (seq instanceof PyString) {
            flat[offset] = seq;
            return offset + 1;
        }
        try {
            items = seq.__len__();
        } catch (final Throwable t) {
            flat[offset] = seq;
            return offset + 1;
        }
        for (int i = 0; i < items; i++) {
            offset = PyMultiarray._seqToObjects(
                    seq.__getitem__(i),
                    flat,
                    offset);
        }
        return offset;
    }