Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Jan 23, 2024
1 parent 2f50c40 commit 77d2fca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "Curvefit"
name = "VegCurveFit"
uuid = "dec11fe7-d51b-4c55-8237-c7557eff4313"
authors = ["Dongdong Kong"]
version = "0.1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/CurveFit/CurveFit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ FUNCS_doubleLog = Dict(
)


function curvefits(y::AbstractArray{T,1}, t, w::::AbstractArray{T,1},
function curvefits(y::AbstractArray{T,1}, t, w::AbstractArray{T,1},
ylu::Vector{Float64}, nptperyear::Integer,
dt;
methods=["AG", "Zhang", "Beck", "Elmore"]) where {T<:Real}
Expand Down
7 changes: 4 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using nlminb
using Test
using VegCurveFit

@testset "nlminb.jl" begin
@testset "nlminb" begin
# Write your own tests here.
start = [0.0] # [1, 2, 3, 4]
lower = [-4.0]
Expand All @@ -12,5 +12,6 @@ using Test
end

f(x) = x[1] - cos(x[1])
r = optim_nlminb(start, f, verbose=false)
r = nlminb(start, f, verbose=false)
@test r["par"][1] == -1.5701006351106073
end

0 comments on commit 77d2fca

Please sign in to comment.