protected static final int getStart1(final PyObject s_start, final int step, final int length) {
        int start;
        if (step < 0) {
            start = PyMultiarray.getIndex(s_start, length - 1);
            if (start < -1) {
                start = length + start;
            }
            if (start < -1) {
                start = -1;
            }
            if (start > length - 1) {
                start = length - 1;
            }
        } else {
            start = PyMultiarray.getIndex(s_start, 0);
            if (start < 0) {
                start = length + start;
            }
            if (start < 0) {
                start = 0;
            }
            if (start > length) {
                start = length;
            }
        }
        return start;
    }