While adapting tensordot to the Array API standard I noticed that for complex inputs it returns a union type of float and complex, instead of just complex:
using Finch
a = zeros(ComplexF64, 2, 1)
a[1, 1] = 1.8 + 1.8im
a[2, 1] = 4.8 + 4.8im
b = [1 + 1im, 2 + 2im]
a_tns = Tensor(a)
b_tns = Tensor(b)
res = Finch.tensordot(a_tns, b_tns, ((1,), (1,)))
eltype(res) # Union{Float64, ComplexF64} but should be ComplexF64
Hi @willow-ahrens,
While adapting
tensordot
to the Array API standard I noticed that for complex inputs it returns a union type of float and complex, instead of just complex: