the type of each entry in the case of ndarray was not actually being checked to be an instance of np.float. Furthermore, a simple fix allows to address the case relevant to #479 of tuples of types including list-like and numeric types. Previously, it would not be possible to have both an 'in' and an 'of' key. Now it is, and 'in' is only used for non-list-like types, and 'of' otherwise.
Reference issues/PRs Motivated by discussion in #479.
Types of changes
Description I found that
validate_params
did not work as intended when allowed types are in a tuple. The'of'
key was ignored in that case. So e.g. inthe type of each entry in the case of ndarray was not actually being checked to be an instance of
np.float
. Furthermore, a simple fix allows to address the case relevant to #479 of tuples of types including list-like and numeric types. Previously, it would not be possible to have both an'in'
and an'of'
key. Now it is, and'in'
is only used for non-list-like types, and'of'
otherwise.Checklist
flake8
to check my Python changes.pytest
to check this on Python tests.