I am currently importing a Julia script that uses Tullio because of its speed. The function is
using Tullio, LoopVectorization
function testfunction_tullio(my_arr, other_arr, sec_arr, third_arr)
new_array = Array{ComplexF64}(undef, length(my_arr))
@tullio new_array[i] = 1 / (my_arr[i] * 1im + sec_arr[j] + other_arr[i,1]) * third_arr[j]
return new_array
end
Is there are nice way to write this in numpy.einsum()
? These are all 1D arrays ( or the 1D component of a 2D array) but I don't know how to include inverses or anything.