array_arange

sisl.utils.array_arange(start, end=None, n=None, dtype=<class 'numpy.int64'>)[source]

Creates a single array from a sequence of numpy.arange

Parameters
startarray_like

a list of start elements for numpy.arange

endarray_like

a list of end elements (exclusive) for numpy.arange. This argument is not used if n is passed.

narray_like

a list of counts of elements for numpy.arange. This is equivalent to end=start + n.

dtypenumpy.dtype

the returned lists data-type

Examples

>>> array_arange([1, 5], [3, 6])
array([1, 2, 5], dtype=int64)
>>> array_arange([1, 6], [4, 9])
array([1, 2, 3, 6, 7, 8], dtype=int64)
>>> array_arange([1, 6], n=[2, 2])
array([1, 2, 6, 7], dtype=int64)