Skip to content

Commit

Permalink
Merge pull request #639 from odow/od/fix-depwarn
Browse files Browse the repository at this point in the history
Fix deprecated use of diffrules
  • Loading branch information
ChrisRackauckas authored Jul 8, 2022
2 parents 463aef9 + 2e8ba99 commit 91588d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TreeViews = "a2a6695c-b41b-5b7d-aed9-dbfdeacea5d7"
ArrayInterfaceCore = "0.1.1"
ConstructionBase = "1.1, 1.2"
DataStructures = "0.18"
DiffRules = "0.1, 1.0"
DiffRules = "1.4"
Distributions = "0.23, 0.24, 0.25"
DocStringExtensions = "0.7, 0.8, 0.9"
DomainSets = "0.5"
Expand Down
10 changes: 5 additions & 5 deletions src/diff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ end
$(SIGNATURES)
TODO
# Examples
```jldoctest
julia> @variables x y z k;
julia> @variables x y z k;
julia> f=k*(abs(x-y)/y-z)^2
k*((abs(x - y) / y - z)^2)
Expand All @@ -158,7 +158,7 @@ julia> Dx=Differential(x) # Differentiate wrt x
julia> dfx=expand_derivatives(Dx(f))
(k*((2abs(x - y)) / y - 2z)*IfElse.ifelse(signbit(x - y), -1, 1)) / y
```
```
"""
function expand_derivatives(O::Symbolic, simplify=false; occurances=nothing)
if istree(O) && isa(operation(O), Differential)
Expand Down Expand Up @@ -332,7 +332,7 @@ derivative(f, args, v) = NoDeriv()

# Pre-defined derivatives
import DiffRules
for (modu, fun, arity) DiffRules.diffrules()
for (modu, fun, arity) DiffRules.diffrules(; filter_modules=(:Base, :SpecialFunctions, :NaNMath))
fun in [:*, :+, :abs, :mod, :rem, :max, :min] && continue # special
for i 1:arity

Expand Down

7 comments on commit 91588d1

@shashi
Copy link
Member

@shashi shashi commented on 91588d1 Jul 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegister register

@shashi
Copy link
Member

@shashi shashi commented on 91588d1 Jul 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shashi
Copy link
Member

@shashi shashi commented on 91588d1 Jul 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/64043

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v4.9.0 -m "<description of version>" 91588d1b3a7f56172d696e7a3ed63ad23477e22a
git push origin v4.9.0

@shashi
Copy link
Member

@shashi shashi commented on 91588d1 Jul 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/64043

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v4.9.0 -m "<description of version>" 91588d1b3a7f56172d696e7a3ed63ad23477e22a
git push origin v4.9.0

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/64043

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v4.9.0 -m "<description of version>" 91588d1b3a7f56172d696e7a3ed63ad23477e22a
git push origin v4.9.0

Please sign in to comment.