Skip to content

Commit

Permalink
Update calculus.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed Jan 27, 2025
1 parent 272975f commit c7e0e90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/calculus.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ end

diff_layout(::MemoryLayout, A, order...; dims...) = diff_size(size(A), A, order...; dims...)
diff_size(sz, a; dims...) = error("diff not implemented for $(typeof(a))")
function diff_size(sz, a, order::Int; dims...)
function diff_size(sz, a, order; dims...)
order < 0 && throw(ArgumentError("order must be non-negative"))
order == 0 && return a
isone(order) ? diff(a) : diff(diff(a), order-1)

Check warning on line 76 in src/calculus.jl

View check run for this annotation

Codecov / codecov/patch

src/calculus.jl#L71-L76

Added lines #L71 - L76 were not covered by tests
Expand Down

0 comments on commit c7e0e90

Please sign in to comment.