* @param stop End of the range (not included)
     * @param step Stepsize between the start and stop
     * @param typecode Datatype of the array
     * @return The new multiarray
     */
    public static PyMultiarray arrayRange(PyObject start, PyObject stop, final PyObject step, char typecode) {
        if (stop instanceof PyNone) {
            stop = start;
            start = Py.Zero;
        }
        if (typecode == '\0') {
            typecode = PyMultiarray.objectsToType(new PyObject[] {
                    start,
                    stop,
                    step });
        }
        if (typecode != 'O') { return PyMultiarray.arrayRange(start.__float__()
                .getValue(), stop.__float__().getValue(),
                step.__float__().getValue(), typecode); }
        // Treat objects specially.
        final PyObject lengthObject = (stop._sub(start))._div(step);
        final int length = Math.max(
                0,
                (int) Math.ceil(lengthObject.__float__().getValue()));
        start = __builtin__.coerce(start, lengthObject).__getitem__(0);
        final PyMultiarray a = PyMultiarray.zeros(new int[] { length }, 'O');
        for (int i = 0; i < length; i++) {
            a.set(i, start);
            start = start._add(step);
        }
        return a;
    }