next up previous index
Next: Variable Dependencies Tree Up: Implementation Previous: Optional Method dependencies()   Index

Other Methods and Properties

The following behavior is only available if the computation is invoked from the dataset method compute_variables() (see Section 24.1.4).

If the variable defines the property _return_type to be one of the following numpy types, Opus will automatically cast the results into that type:

The argument resources passed into the compute_variables() method can contain an entry check_variables. This can be either a list of variable names or a '*' (meaning 'all variables'). For each of those variables a 'check' is perfomed. This means that it will issue a warning if the values being cast are too large to fit into the destination type. In addition, each Opus variable may have the optional pre_check() and post_check() methods to implement the ``programming by contract'' model of software development (see Section 26.3). These methods are also invoked on the 'checked' variables.


next up previous index
Next: Variable Dependencies Tree Up: Implementation Previous: Optional Method dependencies()   Index
info (at) urbansim.org