blosc2.linspace#

blosc2.linspace(start, stop, num=50, endpoint=True, dtype=<class 'numpy.float64'>, shape=None, c_order=True, **kwargs: ~typing.Any)#

Return evenly spaced numbers over a specified interval.

This is similar to numpy.linspace but it returns a NDArray instead of a numpy array. Also, it supports a shape parameter to return a ndim array.

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.

  • num (int) – Number of samples to generate.

  • endpoint (bool) – If True, stop is the last sample. Otherwise, it is not included.

  • dtype (np.dtype or list str) – The data type of the array elements in NumPy format. Default is np.float64.

  • shape (int, tuple or list) – The shape of the final array. If None, the shape will be guessed from num.

  • 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.

Returns:

out – A NDArray is returned.

Return type:

NDArray