Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in adjoint for a vector. #97

Open
dietercastel opened this issue Jul 1, 2020 · 0 comments
Open

Bug in adjoint for a vector. #97

dietercastel opened this issue Jul 1, 2020 · 0 comments

Comments

@dietercastel
Copy link
Contributor

Applying adjoint twice fails for a Real vector.

n = NamedArray(1:4)
a = adjoint(n)
aa = adjoint(a)
ERROR: MethodError: no method matching NamedArray(::UnitRange{Int64}, ::Tuple{OrderedCollections.OrderedDict{String,Int64},OrderedCollections.OrderedDict{String,Int64}}, ::Tuple{Symbol,String})
Closest candidates are:
  NamedArray(::AbstractArray{T,1}, ::AbstractArray{VT,1}, ::Any) where {T, VT} at /Users/dietercastel/.julia/dev/NamedArrays/src/constructors.jl:73
  NamedArray(::AbstractArray{T,1}) where T at /Users/dietercastel/.julia/dev/NamedArrays/src/constructors.jl:73
  NamedArray(::AbstractArray{T,1}, ::AbstractArray{VT,1}) where {T, VT} at /Users/dietercastel/.julia/dev/NamedArrays/src/constructors.jl:73
  ...
Stacktrace:
 [1] adjoint(::NamedArray{Int64,2,LinearAlgebra.Adjoint{Int64,UnitRange{Int64}},Tuple{OrderedCollections.OrderedDict{String,Int64},OrderedCollections.OrderedDict{String,Int64}}}) at /Users/dietercastel/.julia/dev/NamedArrays/src/rearrange.jl:15
 [2] top-level scope at REPL[135]:1
 [3] eval(::Module, ::Any) at ./boot.jl:331
 [4] eval_user_input(::Any, ::REPL.REPLBackend) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
 [5] run_backend(::REPL.REPLBackend) at /Users/dietercastel/.julia/packages/Revise/AMRie/src/Revise.jl:1023
 [6] top-level scope at REPL[2]:0

However transpose(a) works fine as does the case for a complex valued vector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant