GenericLinearAlgebra.jl icon indicating copy to clipboard operation
GenericLinearAlgebra.jl copied to clipboard

ERROR: type Schur has no field Z

Open JeffreySarnoff opened this issue 6 years ago • 11 comments

(v1.1) pkg> add GenericLinearAlgebra#master
  Updating registry at `C:\Users\jas\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/JuliaLinearAlgebra/GenericLinearAlgebra.jl.git`
 Resolving package versions...
  [14197337] ↑ GenericLinearAlgebra v0.1.0 ⇒ v0.1.0+ #master (https://github.com/JuliaLinearAlgebra/GenericLinearAlgebra.jl.git)

julia> using GenericLinearAlgebra
[ Info: Recompiling stale cache file C:\Users\jas\.julia\compiled\v1.1\GenericLinearAlgebra\Tm5A3.ji for GenericLinearAlgebra [14197337-ba66-59df-a3e3-ca00e7dcff7a]

julia> m = Complex{BigFloat}.(reshape(rand(Float32, 5*5),5,5))
5×5 Array{Complex{BigFloat},2}:
 0.132617+0.0im  0.742358+0.0im   0.183927+0.0im  0.632733+0.0im  0.177756+0.0im
 0.125482+0.0im  0.589812+0.0im   0.178626+0.0im  0.308561+0.0im  0.856793+0.0im
 0.769404+0.0im  0.827643+0.0im   0.967583+0.0im  0.829904+0.0im  0.670297+0.0im
 0.115544+0.0im  0.881652+0.0im   0.300636+0.0im  0.676362+0.0im   0.77726+0.0im
 0.670813+0.0im  0.857607+0.0im  0.0240812+0.0im   0.29316+0.0im  0.952149+0.0im

julia> log(m)
ERROR: type Schur has no field Z
Stacktrace:
 [1] getproperty(::GenericLinearAlgebra.Schur{Complex{BigFloat},Array{Complex{BigFloat},2}}, ::Symbol) at C:\Users\jas\.julia\packages\GenericLinearAlgebra\8M4H5\src\eigenGeneral.jl:72
 [2] log(::Array{Complex{BigFloat},2}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\LinearAlgebra\src\dense.jl:655
 [3] top-level scope at none:0

JeffreySarnoff avatar Apr 12 '19 09:04 JeffreySarnoff

Man. I should have checked but just assumed that the Schur factor was sufficient. Will fix.

andreasnoack avatar Apr 12 '19 09:04 andreasnoack

thanks. This should open up a world of capability for ArbNumerics.

JeffreySarnoff avatar Apr 12 '19 09:04 JeffreySarnoff

would you mind tagging a new release when this is good to go -- I had to take the package out of deps because of the old error, and it would be great to have it back.

JeffreySarnoff avatar Apr 12 '19 10:04 JeffreySarnoff

Sure. Will release once the new fix is in.

andreasnoack avatar Apr 12 '19 10:04 andreasnoack

Is it ok to use both this and GenericSVD, or is that redundant?

JeffreySarnoff avatar Apr 12 '19 10:04 JeffreySarnoff

I think the SVD here should now fully cover the functionality of GenericSVD so yes, I think it would be redundant.

Regarding the fix here then it's slightly more tricky than anticipated so I'll have to continue working on this later. The 2014 version of Andreas tried to be very smart and the 2019 Andreas is now paying the price for that.

andreasnoack avatar Apr 12 '19 11:04 andreasnoack

that's funny

JeffreySarnoff avatar Apr 12 '19 11:04 JeffreySarnoff

two other related issues


julia> m = Complex{BigFloat}.(reshape(rand(Float32, 5*5),5,5))
5×5 Array{Complex{BigFloat},2}:
 0.340793+0.0im  0.399013+0.0im   0.776522+0.0im   0.46373+0.0im  0.672711+0.0im
 0.443168+0.0im  0.451965+0.0im   0.271673+0.0im  0.644408+0.0im  0.687101+0.0im
   0.6848+0.0im   0.10325+0.0im    0.49777+0.0im  0.475786+0.0im  0.419239+0.0im
 0.969252+0.0im  0.473123+0.0im  0.0753385+0.0im  0.993371+0.0im  0.170664+0.0im
 0.707709+0.0im  0.326565+0.0im   0.860123+0.0im  0.319933+0.0im  0.340225+0.0im

julia> m^0.5
ERROR: MethodError: no method matching iterate(::GenericLinearAlgebra.Schur{Complex{BigFloat},Array{Complex{BigFloat},2}})
Closest candidates are:
  iterate(::Core.SimpleVector) at essentials.jl:568
  iterate(::Core.SimpleVector, ::Any) at essentials.jl:568
  iterate(::ExponentialBackOff) at error.jl:199
  ...
Stacktrace:
 [1] indexed_iterate(::GenericLinearAlgebra.Schur{Complex{BigFloat},Array{Complex{BigFloat},2}}, ::Int64) at .\tuple.jl:66
 [2] schurpow(::Array{Complex{BigFloat},2}, ::Float64) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\LinearAlgebra\src\dense.jl:389
 [3] ^(::Array{Complex{BigFloat},2}, ::Float64) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\LinearAlgebra\src\dense.jl:434
 [4] top-level scope at none:0

julia> sqrt(m)
ERROR: type Schur has no field vectors
Stacktrace:
 [1] getproperty(::GenericLinearAlgebra.Schur{Complex{BigFloat},Array{Complex{BigFloat},2}}, ::Symbol) at C:\Users\jas\.julia\packages\GenericLinearAlgebra\8M4H5\src\eigenGeneral.jl:72
 [2] sqrt(::Array{Complex{BigFloat},2}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\LinearAlgebra\src\dense.jl:719
 [3] top-level scope at none:0

JeffreySarnoff avatar Apr 12 '19 12:04 JeffreySarnoff

The same error appears for hessenberg(matrix).Q. This is used here https://github.com/JuliaControl/ControlSystems.jl/blob/ec5ed51f84588783162ee7391cfbd3771bd03df2/src/freqresp.jl#L35

baggepinnen avatar May 16 '19 11:05 baggepinnen

I would like to use matrix logarithms and running into this as well

lkapelevich avatar Aug 04 '20 17:08 lkapelevich

bump, I ran into this issue

chriscoey avatar Dec 25 '20 15:12 chriscoey