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)
| 791 | |
| 792 | |
| 793 | def _ensure_ndmin_ndarray_check_param(ndmin): |
| 794 | """Just checks if the param ndmin is supported on |
| 795 | _ensure_ndmin_ndarray. It is intended to be used as |
| 796 | verification before running anything expensive. |
| 797 | e.g. loadtxt, genfromtxt |
| 798 | """ |
| 799 | # Check correctness of the values of `ndmin` |
| 800 | if ndmin not in [0, 1, 2]: |
| 801 | raise ValueError(f"Illegal value of ndmin keyword: {ndmin}") |
| 802 | |
| 803 | def _ensure_ndmin_ndarray(a, *, ndmin: int): |
| 804 | """This is a helper function of loadtxt and genfromtxt to ensure |
no outgoing calls
no test coverage detected
searching dependent graphs…