Domains

Domain

alias of builtins.type

class BintType[source]

Bases: funsor.domains.ArrayType

size
class RealsType[source]

Bases: funsor.domains.ArrayType

dtype = 'real'
class Bint[source]

Bases: object

Factory for bounded integer types:

Bint[5]           # integers ranging in {0,1,2,3,4}
Bint[2, 3, 3]     # 3x3 matrices with entries in {0,1}
dtype = None
shape = None
class Reals[source]

Bases: object

Type of a real-valued array with known shape:

Reals[()] = Real  # scalar
Reals[8]          # vector of length 8
Reals[3, 3]       # 3x3 matrix
shape = None
class Real

Bases: object

shape = ()
reals(*args)[source]
bint(size)[source]
find_domain(op, *domains)[source]

Finds the Domain resulting when applying op to domains. :param callable op: An operation. :param Domain *domains: One or more input domains.