Just checks if the param ndmin is supported on _ensure_ndmin_ndarray. It is intended to be used as verification before running anything expensive. e.g. loadtxt, genfromtxt
(ndmin)
| 748 | |
| 749 | |
| 750 | def _ensure_ndmin_ndarray_check_param(ndmin): |
| 751 | """Just checks if the param ndmin is supported on |
| 752 | _ensure_ndmin_ndarray. It is intended to be used as |
| 753 | verification before running anything expensive. |
| 754 | e.g. loadtxt, genfromtxt |
| 755 | """ |
| 756 | # Check correctness of the values of `ndmin` |
| 757 | if ndmin not in [0, 1, 2]: |
| 758 | raise ValueError(f"Illegal value of ndmin keyword: {ndmin}") |
| 759 | |
| 760 | def _ensure_ndmin_ndarray(a, *, ndmin: int): |
| 761 | """This is a helper function of loadtxt and genfromtxt to ensure |
no outgoing calls
no test coverage detected