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
start (array_like) – a list of start elements for
numpy.arange
end (array_like) – a list of end elements (exclusive) for
numpy.arange
. This argument is not used if n is passed.n (array_like) – a list of counts of elements for
numpy.arange
. This is equivalent toend=start + n
.dtype (numpy.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)