Open
Description
I tried the example below (taken from linearized.py
but with dtype='complex'
) which failed with
TypeError: Cannot cast ufunc add output from dtype('complex128') to dtype('float64') with casting rule 'same_kind'
This can be fixed by disp_field_space = space.tangent_bundle.real_space
. Is this the desired behaviour?
import odl
space = odl.uniform_discr(0, 1, 5, dtype='complex')
disp_field_space = space.tangent_bundle
template = space.element([0, 0, 1, 0, 0])
displacement_field = disp_field_space.element([[0, 0, 0, -0.2, 0]])
odl.deform.linear_deform(template, displacement_field)