You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is only indirectly due to the print tree call:
The shape is cached when you look it up, so even just a print(data.shape) will do the same.
In most cases it is not a valid operation to change the shape of the data by adding variables... cases where it is valid include:
First variable/channel added (here); this is the only place where adding ndim (without generating a new data object) is valid, as far as I'm concerned
adding a broadcasting axis for an existing ndim
We currently do nothing to enforce these constraints.
My proposal is to put these checks into the create_x functions and invalidate the shape cache (self._shape = None) accordingly. This will also help prevent creation of broken data objects with inconsistent shapes.
e.g.
data.shape is
()
. Ifroot.print_tree()
is removed, shape is(4,)
.Seems to only apply when parent is called. e.g shape remains
(4,)
ifdata.print_tree()
is called before or aftercreate_variable
.The text was updated successfully, but these errors were encountered: