Skip to content

Commit

Permalink
Generalize function-types
Browse files Browse the repository at this point in the history
  • Loading branch information
RJDennis committed Dec 21, 2021
1 parent 13fceb2 commit cd4b26d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PiecewiseLinearApprox"
uuid = "fcfa6960-8e2e-11e9-2cde-29dd09221fb3"
authors = ["Richard Dennis <richard.dennis@glasgow.ac.uk>"]
version = "0.1.5"
version = "0.1.6"

[compat]
julia = "^1.1"
Expand Down
2 changes: 1 addition & 1 deletion src/piecewise_linear.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function piecewise_linear_evaluate(y::AbstractArray{T,N},x::Union{NTuple{N,Array

for j = d:-1:1

new_data = zeros(Int(length(data)/2))
new_data = zeros(R,Int(length(data)/2))
for i = 1:length(new_data)
new_data[i] = data[2*(i-1)+1] + w[j]*(data[2*i]-data[2*(i-1)+1])
end
Expand Down

0 comments on commit cd4b26d

Please sign in to comment.