hmf.core._kernels.arrays.read_only

hmf.core._kernels.arrays.read_only(x: ArrayLike) → ndarray[tuple[Any, ...], dtype[float64]][source]

Return a read-only float copy of an array.

The copy keeps the array’s subclass, if any, so it can’t be changed through the original or through itself.

Parameters:

x – An array, or anything numpy can convert to one.

Returns:

A new float64 array, not writeable.

Return type:

numpy.ndarray