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

imag function for type Polynomial #584

Open
kpobrien opened this issue Sep 3, 2024 · 0 comments
Open

imag function for type Polynomial #584

kpobrien opened this issue Sep 3, 2024 · 0 comments

Comments

@kpobrien
Copy link

kpobrien commented Sep 3, 2024

Hi, is there a reason real and conj are defined for the type Polynomial but imag is not? If no reason not to, I can make a PR defining the analogous functions. As a MWE, the real, and conj calls work, but imag is not defined.

using Polynomials
p = Polynomial((6,3,3.0+1im))
real(p)
conj(p)
imag(p)
ERROR: MethodError: no method matching imag(::Polynomial{ComplexF64, :x})

Closest candidates are:
  imag(::Missing)
   @ Base missing.jl:101
  imag(::LinearAlgebra.UnitLowerTriangular)
   @ LinearAlgebra ~/.julia/juliaup/julia-1.10.5+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/triangular.jl:160
  imag(::LinearAlgebra.UnitUpperTriangular)
   @ LinearAlgebra ~/.julia/juliaup/julia-1.10.5+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/triangular.jl:161
  ...

Stacktrace:
 [1] top-level scope
   @ REPL[5]:1

Thanks!

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