Skip to content

Commit

Permalink
Bug/layers/method overwrite (#215)
Browse files Browse the repository at this point in the history
* bug(layers): remove the extra declaration for Base.:!

Closes Fauxcurrence overload issue #214

* semver(layers): v0.9.5
  • Loading branch information
tpoisot committed Oct 16, 2023
1 parent 088a1be commit c41ff08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion SimpleSDMLayers/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SimpleSDMLayers"
uuid = "2c645270-77db-11e9-22c3-0f302a89c64c"
authors = ["Timothée Poisot <timothee.poisot@umontreal.ca>", "Gabriel Dansereau <gabriel.dansereau@umontreal.ca>"]
version = "0.9.4"
version = "0.9.5"

[deps]
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Expand Down
6 changes: 0 additions & 6 deletions SimpleSDMLayers/src/lib/overloads.jl
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,6 @@ Base.:%(layer::T, n::Number) where {T <: SimpleSDMLayer} = broadcast(x -> x % n,
Base.:-(layer::T) where {T <: SimpleSDMLayer} = broadcast(-, layer)
Base.:!(layer::T) where {T <: SimpleSDMLayer} = broadcast(!, layer)

function Base.:!(layer::T) where {T <: SimpleSDMLayer}
ngrid = (!).(SimpleSDMLayers.grid(layer))
RT = T <: SimpleSDMResponse ? SimpleSDMResponse : SimpleSDMPredictor
return RT(ngrid, layer.left, layer.right, layer.bottom, layer.top)
end

function Base.findmax(layer::T) where {T <: SimpleSDMLayer}
val, pos = findmax(values(layer))
return (val, keys(layer)[pos])
Expand Down

2 comments on commit c41ff08

@tpoisot
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register subdir="SimpleSDMLayers"

@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/93510

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 SimpleSDMLayers-v0.9.5 -m "<description of version>" c41ff080ab3c8dec2e0386e9e0d17202e726000e
git push origin SimpleSDMLayers-v0.9.5

Please sign in to comment.