instance_data
class InstanceData
Instance Data class
The constructor provides type validation and conversion from user's input to valid instance data type.
Attributes
- tensor_data(dict[str, numpy.ndarray]) : tensor value of Placheolder. The key is uuid of the corresponding Placheolder.
- jagged_data(dict[str, list]) : jagged array value of JaggedArray. The key is uuid of the corresponding JaggedArray.
- fixed_variables(dict[str, dict[tuple[int, ...], float]]) : fixed variable values.
- indices(dict[str, int]) : value of Element. The attribute is changing in compile process.
__init__ (self, instance_data, fixed_vars, ph_names, indices) -> -
Parameters
- instance_data(dict) : user input instance_data.
- fixed_vars(dict) : user input fixed_variables.
- ph_vars(list[name]) : Placeholder list include user defined model. This is used for validation.
- indices(typ.Optional[dict]) : value of each Elements. Defaults to None.
Raises
- ValueError: user's input is invalid.
get_length (self, name, subscripts, axis) -> -
get_value (self, uuid, subscripts) -> -
class SubstituteError
Substitute Error.
This error is raised when the substitute function. This class is inherited from JijModelingTranspilerException.
raise_type_error (varname, obj, type) -> -
Raise TypeError.
Parameters
- obj(Any) : target object
- type_(Any) : target type