emat/util/distributions.py
def is_discrete_dist(rv):
	"""Check if the (frozen) distribution is discrete."""

	if isinstance(rv, truncated):
		rv = rv.frozen_dist

	if not isinstance(rv, rv_frozen):
		if hasattr(rv, 'dist') and isinstance(rv.dist, rv_frozen):
			rv = rv.dist

	if isinstance(rv.dist, rv_discrete):
		return True

	return False
Check if the (frozen) distribution is discrete.
Check if the (frozen) distribution is discrete.
Check if the ( frozen ) distribution is discrete .
def is_discrete_dist(rv):
	if isinstance(rv, truncated):
		rv = rv.frozen_dist
	if not isinstance(rv, rv_frozen):
		if hasattr(rv, 'dist') and isinstance(rv.dist, rv_frozen):
			rv = rv.dist
	if isinstance(rv.dist, rv_discrete):
		return True
	return False
def is_discrete_dist ( rv ) : if isinstance ( rv , truncated ) : rv = rv . frozen_dist if not isinstance ( rv , rv_frozen ) : if hasattr ( rv , 'dist' ) and isinstance ( rv . dist , rv_frozen ) : rv = rv . dist if isinstance ( rv . dist , rv_discrete ) : return True return False
Check if the (frozen) distribution is discrete.
Check if the ( frozen ) distribution is discrete .
"""Check if the (frozen) distribution is discrete."""
rv