ddl.utils
.check_domain¶
-
ddl.utils.
check_domain
(domain, n_features)[source]¶ Check and return domain, broadcasting domain if necessary.
Parameters: - domain : array-like, shape (2,) or (2, n_features)
The minimum and maximum for each dimension. If shape is (2,) then the minimum and maximum are assumed to be the same for every dimension.
- n_features : int
The number of features. Used to check domain shape or broadcast domain if necessary.
Returns: - domain : array, shape (2, n_features)
Domain after error checking and broadcasting as necessary.
>>> check_domain([0, 1], 3) ..
- array([[0, 1],
[0, 1], [0, 1]])