blosc2.arange#
- blosc2.arange(start: int | float = 0, stop: int | float | None = None, step: int | float | None = 1, dtype: ~numpy.dtype | str = <class 'numpy.int64'>, shape: int | tuple | list | None = None, c_order: bool = True, **kwargs: ~typing.Any) NDArray #
Return evenly spaced values within a given interval.
- Parameters:
start¶ (int, float, complex or np.number) – The starting value of the sequence.
stop¶ (int, float, complex or np.number) – The end value of the sequence.
step¶ (int, float, complex or np.number) – Spacing between values.
dtype¶ (np.dtype or list str) – The data type of the array elements in NumPy format. Default is np.uint8. This will override the typesize in the compression parameters if they are provided.
shape¶ (int, tuple or list) – The shape of the final array. If None, the shape will be computed.
c_order¶ (bool) – Whether to store the array in C order (row-major) or insertion order. Insertion order means that values will be stored in the array following the order of chunks in the array; this is more memory efficient, as it does not require an intermediate copy of the array. Default is C order.
kwargs¶ (dict, optional) – Keyword arguments that are supported by the
empty()
constructor.
- Returns:
out – A NDArray is returned.
- Return type:
Examples
>>> import blosc2 >>> import numpy as np >>> # Create an array with values from 0 to 10 >>> array = blosc2.arange(0, 10, 1) >>> print(array) [0 1 2 3 4 5 6 7 8 9]