ddl.utils.get_domain_or_default

ddl.utils.get_domain_or_default(destructor, warn=False)[source]

Get the domain of the density or return DEFAULT_DOMAIN.

Default domain is [-infty, infty].

Parameters:
destructor : estimator

Destructor estimator.

warn : bool, default=False

Whether to warn if there the estimator does not implement get_domain.

Returns:
domain : array-like, shape (2,) or (2, n_features)

The domain of the density as returned by get_domain or just return the default domain.