modelutil: Frequently Asked Questions

Index of Questions

Questions and Answers

When I multiply a regular array by a Field object I don't get a Field object back. Why?

When using operators (e.g. +, -) with Field objects, execution order can be important. Consider a*b. If a is a Field object and b is a regular array, the product will also be a Field object since the multiplication is done using the __mul__ method in Field. However, if a is a regular array and b is a Field object, the product will be a regular array since the __mul__ method in the regular array class is used instead. To ensure you always get a Field object result, order operations with Field objects accordingly. [Back to Index]

Why has an important Field variable in my State container suddenly been replaced by garbage?

One common reason this happens is at some point you created and added to your State container another Field object that has the same id value as the Field variable you lost. [Back to Index]

I apply a function to a Field object and my output Field object metadata are empty. Why?

Most likely everything's behaving normal; most numerical functions on Field objects do this. Details are found here. [Back to Index]

Return to modelutil Reference Manual Index.
Return to modelutil Home Page.

Valid HTML 4.01! Valid CSS! Updated: January 11, 2005 by Johnny Lin <email address>. License.