Closed marcusps closed 9 years ago
There seems to be a problem with tau
?
julia> expmv(1.,pi/4*[0 1; 1 0]|>sparse, [1.;0.])
2-element Array{Float64,1}:
1.32461
0.868671
julia> expmv(1.,pi/4*(-1im)*[0 1; 1 0]|>sparse, complex([1.;0.]))
2-element Array{Complex{Float64},1}:
0.707107+0.0im
0.0-0.707107im
I have somehow introduced this in the process of optimizing the code - for aeb3c24b8a483eb92c7a7c17426c654880dcf074 it still works.
Ok, the mutating scale!
in line 85 seems to be problematic; changing it to scale
makes it work again. Can't investigate further now ...
I guess the issue is that you don't want to modify hm
in that call, and using scale!
in combination with slice
does just that. I'll submit a pull request with the fix.
This happens even for 2x2 matrices, and affects complex and real matrices equally