Skip to content

Commit 77d2fca

Browse files
committed
fix bugs
1 parent 2f50c40 commit 77d2fca

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name = "Curvefit"
1+
name = "VegCurveFit"
22
uuid = "dec11fe7-d51b-4c55-8237-c7557eff4313"
33
authors = ["Dongdong Kong"]
44
version = "0.1.0"

src/CurveFit/CurveFit.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ FUNCS_doubleLog = Dict(
2828
)
2929

3030

31-
function curvefits(y::AbstractArray{T,1}, t, w::::AbstractArray{T,1},
31+
function curvefits(y::AbstractArray{T,1}, t, w::AbstractArray{T,1},
3232
ylu::Vector{Float64}, nptperyear::Integer,
3333
dt;
3434
methods=["AG", "Zhang", "Beck", "Elmore"]) where {T<:Real}

test/runtests.jl

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using nlminb
21
using Test
2+
using VegCurveFit
33

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

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

0 commit comments

Comments
 (0)