Skip to content

Commit

Permalink
Update derivatives.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieugomez committed Jun 19, 2024
1 parent 3d0c8b3 commit 364faab
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/derivatives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ struct FirstDerivative{T, X <: AbstractVector{<:Real}, Y <: AbstractVector{<: Re
end
end

function FirstDerivative(x, y; bc = (0, 0), direction = :upward)
FirstDerivative(x, y, bc, direction)
end
FirstDerivative(x, y; bc = (0, 0), direction = :upward) = FirstDerivative(x, y, bc, direction)

Base.size(d::FirstDerivative) = (length(d.x), 1)

Expand Down Expand Up @@ -51,9 +49,7 @@ struct SecondDerivative{T, X <: AbstractVector{<:Real}, Y <: AbstractVector{<: R
end
end

function SecondDerivative(x, y; bc = (0, 0))
SecondDerivative(x, y, bc)
end
SecondDerivative(x, y; bc = (0, 0)) = SecondDerivative(x, y, bc)

Base.size(d::SecondDerivative) = (length(d.x), 1)

Expand Down

0 comments on commit 364faab

Please sign in to comment.