Skip to content

Commit

Permalink
Update to ArrayInterface v7 (#32)
Browse files Browse the repository at this point in the history
* Update to ArrayInterface v7

* Update src/EllipticalSliceSampling.jl

* Update Project.toml

---------

Co-authored-by: David Widmann <[email protected]>
  • Loading branch information
ChrisRackauckas and devmotion authored Feb 18, 2023
1 parent a76718d commit ca4babb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name = "EllipticalSliceSampling"
uuid = "cad2338a-1db2-11e9-3401-43bc07c9ede2"
authors = ["David Widmann <[email protected]>"]
version = "1.0.0"
version = "1.1.0"

[deps]
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
ArrayInterfaceCore = "30b0a656-2188-435a-8636-2ec0e6a096e2"
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
AbstractMCMC = "3.2, 4"
ArrayInterfaceCore = "0.1"
ArrayInterface = "7"
Distributions = "0.22, 0.23, 0.24, 0.25"
julia = "1.6"

Expand Down
2 changes: 1 addition & 1 deletion src/EllipticalSliceSampling.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module EllipticalSliceSampling

using AbstractMCMC: AbstractMCMC
using ArrayInterfaceCore: ArrayInterfaceCore
using ArrayInterface: ArrayInterface
using Distributions: Distributions

using Random: Random
Expand Down
4 changes: 2 additions & 2 deletions src/abstractmcmc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ end

function ESSState(sample, loglikelihood)
# create cache since it was not provided (initial sampling step)
cache = ArrayInterfaceCore.ismutable(sample) ? similar(sample) : nothing
cache = ArrayInterface.ismutable(sample) ? similar(sample) : nothing
return ESSState(sample, loglikelihood, cache)
end

Expand Down Expand Up @@ -83,7 +83,7 @@ function AbstractMCMC.step(
θ = θmin + rand(rng) * (θmax - θmin)

# recompute the proposal
if ArrayInterfaceCore.ismutable(fnext)
if ArrayInterface.ismutable(fnext)
proposal!(fnext, prior, f, ν, θ)
else
fnext = proposal(prior, f, ν, θ)
Expand Down

2 comments on commit ca4babb

@devmotion
Copy link
Member

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/77985

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 v1.1.0 -m "<description of version>" ca4babb2baba9008805bc8234a6fd182119e57dc
git push origin v1.1.0

Please sign in to comment.