hmf.core._kernels.arrays.check_table¶
- hmf.core._kernels.arrays.check_table(columns: ~collections.abc.Mapping[str, ~numpy._typing.ArrayLike], *, where: str, min_size: int = 1, error: type[Exception] = <class 'ValueError'>) tuple[ndarray[tuple[Any, ...], dtype[float64]], ...][source]¶
Check that the columns of a table are 1D, of the same length, and long enough.
- Parameters:
columns – The columns, by name.
where – Who checks it, for the message.
min_size – The least number of rows.
error – The exception to raise.
- Returns:
The columns as float arrays, in order.
- Return type:
- Raises:
Exception –
error, if a column is not 1D, the lengths differ, or there are fewer thanmin_sizerows.