nifty.cl.domains.domain module#
- class Domain[source]#
Bases:
objectThe abstract class repesenting a (structured or unstructured) domain.
- __eq__(x)[source]#
Checks whether two domains are equal.
- Parameters:
x (Domain) – The domain self is compared to.
- Returns:
bool
- Return type:
True iff self and x describe the same domain.
Notes
Only members that are explicitly added to
_needed_for_hashwill be used for comparison.Subclasses of Domain should not re-define
__eq__(),__ne__(), or__hash__(); they should instead add their relevant attributes’ names to_needed_for_hash.
- __hash__()[source]#
Returns a hash value for the object.
Notes
Only members that are explicitly added to
_needed_for_hashwill be used for hashing.
- property shape#
number of pixels along each axis
The shape of the array-like object required to store information defined on the domain.
- Type:
tuple of int
- property size#
total number of pixels.
Equivalent to the products over all entries in the domain’s shape.
- Type:
int