Skip to content

JaxLinearOperator: Fix error in adjoint_times when supplying manually implemented transpose function

Lukas Platz requested to merge fixup-JaxLinearOperator into NIFTy_8

The apply-method of JaxLinearOperator expects func_T to return a tuple of values because jax.linear_transform does so. If the user supplies a manually implemented transpose function implementation which returns just a plain value array, this assumption is broken, causing a processing error in the apply method.

To fix this, this patch wraps manually supplied transpose function implementations in a lambda function that encapsulates their result in a tuple.

Merge request reports