Guards for spatial dimension in MultiIndexSet `from_degree` initialization
Currently, the from_degree
initialization for MultiIndexSet
checks if the spatial_dimension
is integer. However, it doesn't check if the integer spatial dimension is indeed valid. I think that spatial_dimension
must be a strictly positive integer.
Currently,
import minterpy as mp
mi = mp.MultiIndexSet.from_degree(0, 2)
throws an exception from get_exponent_matrix
function which is not very informative:
ValueError: at least one array or dtype is required
We can implement this guard for spatial_dimension
in the from_degree
class method or in the get_exponent_matrix
function or perhaps in both places.