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 #477

Closed
jguterl opened this issue Mar 9, 2023 · 4 comments
Closed

bug #477

jguterl opened this issue Mar 9, 2023 · 4 comments

Comments

@jguterl
Copy link

jguterl commented Mar 9, 2023

running "fit(Bernstein, t, ydata, N)"

bug related to commit 972e991 line 157 in common.jl

ERROR: MethodError: objects of type Symbol are not callable

Some of the types have been truncated in the stacktrace for improved reading. To emit complete information
in the stack trace, evaluate `TruncatedStacktraces.VERBOSE[] = true` and re-run the code.

Stacktrace:
  [1] _broadcast_getindex_evalf
    @ ./broadcast.jl:670 [inlined]
  [2] _broadcast_getindex
    @ ./broadcast.jl:643 [inlined]
  [3] getindex
    @ ./broadcast.jl:597 [inlined]
  [4] copy
    @ ./broadcast.jl:899 [inlined]
  [5] materialize
    @ ./broadcast.jl:860 [inlined]
  [6] (SpecialPolynomials.Bernstein{Float64, :x})(x::Vector{Float64}, var::Polynomials.Var{:x}) (repeats 2 times)
    @ SpecialPolynomials ~/.julia/packages/Polynomials/agWXR/src/abstract.jl:140
  [7] _fit(P::Type{SpecialPolynomials.Bernstein}, x::Vector{Float64}, y::Vector{Float64}, deg::Int64; weights::Nothing, var::Symbol)
    @ Polynomials ~/.julia/packages/Polynomials/agWXR/src/common.jl:157
  [8] #fit#17
    @ ~/.julia/packages/Polynomials/agWXR/src/common.jl:118 [inlined]
  [9] fit
    @ ~/.julia/packages/Polynomials/agWXR/src/common.jl:112 [inlined]
 [10] PlasmaFacingSurfaces.RZBernsteinFit(xdata::Vector{Float64}, ydata::Vector{Float64}, N::Int64)
    @ PlasmaFacingSurfaces ~/.julia/dev/PlasmaFacingSurfaces/src/fit.jl:22
 [11] PlasmaFacingSurfaces.RZBernsteinFit()
    @ PlasmaFacingSurfaces ~/.julia/dev/PlasmaFacingSurfaces/src/fit.jl:16
 [12] PlasmaFacingSurfaces.MainChamberWall(id::Vector{Symbol})
    @ PlasmaFacingSurfaces ~/.julia/dev/PlasmaFacingSurfaces/src/main_chamber_walls.jl:12
 [13] PlasmaFacingSurfaces.MainChamberWalls(eqt::IMASDD.equilibrium__time_slice{Float64})
    @ PlasmaFacingSurfaces ~/.julia/dev/PlasmaFacingSurfaces/src/main_chamber_walls.jl:14
 [14] PlasmaFacingSurfaces.PFSDesign(eqt::IMASDD.equilibrium__time_slice{Float64})
    @ PlasmaFacingSurfaces ~/.julia/dev/PlasmaFacingSurfaces/src/PlasmaFacingSurfaces.jl:38
 [15] top-level scope
    @ ./REPL[6]:41
@jverzani
Copy link
Member

jverzani commented Mar 9, 2023

Thx for the report. I’ll have a look.

@jverzani
Copy link
Member

jverzani commented Mar 9, 2023

It is a missing method in SpecialPolynomials. I'll work out a fix. In the interim, you could fit to the Polynomial type and call convert, but that is a bit of a hacky solution.

@jverzani
Copy link
Member

jverzani commented Mar 9, 2023

Closed by #478

@jverzani jverzani closed this as completed Mar 9, 2023
@jguterl
Copy link
Author

jguterl commented Mar 10, 2023 via email

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

2 participants