c3.c3objs
¶
Basic custom objects.
Module Contents¶
- exception c3.c3objs.QuantityOOBException[source]¶
Bases:
ValueError
Inappropriate argument value (of correct type).
- class __cause__¶
exception cause
- class __context__¶
exception context
- __delattr__()¶
Implement delattr(self, name).
- __dir__()¶
Default dir() implementation.
- __eq__()¶
Return self==value.
- __format__()¶
Default object formatter.
- __ge__()¶
Return self>=value.
- __getattribute__()¶
Return getattr(self, name).
- __gt__()¶
Return self>value.
- __hash__()¶
Return hash(self).
- __le__()¶
Return self<=value.
- __lt__()¶
Return self<value.
- __ne__()¶
Return self!=value.
- __reduce__()¶
Helper for pickle.
- __reduce_ex__()¶
Helper for pickle.
- __repr__()¶
Return repr(self).
- __setattr__()¶
Implement setattr(self, name, value).
- __sizeof__()¶
Size of object in memory, in bytes.
- __str__()¶
Return str(self).
- __subclasshook__()¶
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class c3.c3objs.C3obj(name, desc='', comment='', params=None)[source]¶
Represents an abstract object with parameters. To be inherited from.
- Parameters
name (str) – short name that will be used as identifier
desc (str) – longer description of the component
comment (str) – additional information about the component
params (dict) – Parameters in this dict can be accessed and optimized
- class c3.c3objs.Quantity(value, unit='undefined', min_val=None, max_val=None, symbol='\\alpha')[source]¶
Represents any physical quantity used in the model or the pulse specification. For arithmetic operations just the numeric value is used. The value itself is stored in an optimizer friendly way as a float between -1 and 1. The conversion is given by
scale (value + 1) / 2 + offset
- Parameters
value (np.array(np.float64) or np.float64) – value of the quantity
min_val (np.array(np.float64) or np.float64) – minimum this quantity is allowed to take
max_val (np.array(np.float64) or np.float64) – maximum this quantity is allowed to take
unit (str) – physical unit
symbol (str) – latex representation
- get_value() tensorflow.Tensor [source]¶
Return the value of this quantity as tensorflow.
- Parameters
val (tf.float64) –
dtype (tf.dtypes) –