static PyMultiarray arrayRange(final double start, final double stop, final double step, final char typecode) {
        final int length = Math.max(0, (int) Math.ceil((stop - start) / step));
        final PyMultiarray a = PyMultiarray.zeros(new int[] { length }, 'd');
        for (int i = 0; i < length; i++) {
            Array.setDouble(a.data, i, i * step + start);
        }
        return a.astype(typecode);
    }