reno.ops.log#
- class reno.ops.log(a)#
Bases:
Operationln(a) (natural log, naming it log because this is pytensor’s and numpy’s default)
String notation:
(log A B C)Methods
__init__(a)astype(dtype)clip(min, max)equal(obj)eval([t, save, force])'wrap' all operation eval functions so we get better error handling.
find_refs_of_type(search_type[, already_checked])Actually recursive as opposed to seek_refs, returns a list of all equation parts matching passed type.
get_shape()For now this is returning an integer because we only allow a single additional dimension.
get_type()Similar to shape, this gets computed recursively, used to automatically determine if the value needs to be initialized with a certain numpy type.
is_static()Convenience shortcut for
reno.utils.is_static()- True if this equation doesn't rely on any dynamic values (thus constant), False if it does.latex(**kwargs)Wrapper around op_latex, which subclasses should override
mean([axis])not_equal(obj)op_eval(**kwargs)Any new operations should implement this method.
op_latex(**kwargs)Override this in subclasses
op_repr()Get a string representation for the op name/label, used for printing and parsing.
op_types()Get a list of classes that inherit from this one, in other words all of the possible defined operations.
pt(**refs)Get a pytensor graph representing this piece of an equation.
pt_str(**refs)Construct a string containing relevant pytensor code for this piece of the equation.
seek_refs([include_ref_types])Immediate refs only, depth=1.
series_max()series_min()sum([axis])Attributes
OP_REPRIf defined, this is what gets printed as the 'label' for the operation in the repr, and is what's used during parsing.
dtypeThe type of each underlying value.
shapeThe size of the data dimension, 1 by default.
timeseriesGet a timeseries view of the data (includes all historical data across all timesteps.)
non_repr_part_indicesUse this to "hide" a sub_equation_part in the string repr, e.g. if it's important for computation but isn't part of parsing.
- __annotations__ = {}#
- __module__ = 'reno.ops'#
- get_type()#
Similar to shape, this gets computed recursively, used to automatically determine if the value needs to be initialized with a certain numpy type.
- Return type:
type
- op_eval(**kwargs)#
Any new operations should implement this method. (Put all evaluation logic in here, as opposed to overriding eval.)
- op_latex(**kwargs)#
Override this in subclasses
- pt(**refs)#
Get a pytensor graph representing this piece of an equation.
- Parameters:
refs (dict[str, TensorVariable])
- Return type:
TensorVariable
- pt_str(**refs)#
Construct a string containing relevant pytensor code for this piece of the equation. This is useful for “compiling” into pymc code.
- Parameters:
refs (dict[str, str])
- Return type:
str