modelutil
: Frequently Asked QuestionsField
object I don't get a
Field
object back. Why?Field
variable in my
State
container suddenly been replaced
by garbage?Field
object and my output Field
object metadata
are empty. Why?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]
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]
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]