Unexpected behaviour of ducktape and ducktape_left
I've noticed an unexpected behaviour of ducktape_left
and ducktape
in combination with Linearization
.
The following example code:
a = ift.Linearization.make_var(ift.from_random(ift.RGSpace(3))).ducktape_left('a')
does not produce an error but produces something that is not an instance of Linearization
any more. Instead it returns an _OpChain
. The same is true if we replace ducktape_left
with ducktape
.
I suspect this is due to the fact that Linearization
is now an instance of Operator
but does not implement ducktape
itself.
In contrast if we try this with Field
:
a = ift.from_random(ift.RGSpace(3)).ducktape_left('a')
we get an error.
I see two possible solutions for this: either we disable the (currently unintended?) support of Linearization
in ducktape
and ducktape_left
or we implement a proper version of them for Field
and Linearization
.
@all does somebody know what is going on here?