Closed leuchtum closed 4 months ago
Hey @leuchtum, this behavior is intended. As soon as DataArray
are passed as lower and upper bounds, the coords and dims arguments are ignored, as the objects already provide full information about the coordinates. Considering the coords and dims on top would lead to ambiguous information (what if objects contain an axis which is not in coords?).
So, problably the cleanest solution is to adjust the lower and upper bound as done in fix.
I can see how it can lead to such ambiguity. Thank you @FabianHofmann for the explanation. I am closing the issue in this case.
Issue
When initializing a variable over two dimensions and restricting it with bounds defined over only one dimension, the variable is missing a dimension. I'm not sure if this is intentional behavior, but it feels quite unintuitive to me.
Initialize example
Result using
a_lb
anda_ub
-> Missing dimensiondimB
Fix 1: Add constraints later
Fix 2: Modify
a_lb
anda_ub