Skip to content

Commit

Permalink
Merge pull request #3322 from JuliaReach/schillic/linear_map
Browse files Browse the repository at this point in the history
Fix linear_map with number
  • Loading branch information
schillic authored May 8, 2023
2 parents bb1804d + fba1338 commit 4299e76
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "LazySets"
uuid = "b4f0291d-fe17-52bc-9479-3d1a343d9043"
version = "2.7.5"
version = "2.7.6"

[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand Down
6 changes: 3 additions & 3 deletions src/Interfaces/LazySet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1979,10 +1979,10 @@ function linear_map(M::AbstractMatrix, P::LazySet; kwargs...)
end

"""
linear_map(a::Number, P::LazySet; kwargs...)
linear_map(a::Number, X::LazySet; kwargs...)
Alias for `scale(a, P; kwargs...)`.
Alias for `scale(a, X; kwargs...)`.
"""
function linear_map(a::Number, P::LazySet; kwargs...)
function linear_map(a::Number, X::LazySet; kwargs...)
return scale(a, X; kwargs...)
end
2 changes: 2 additions & 0 deletions test/Sets/Interval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ for N in [Float64, Float32, Rational{Int}]

# concrete linear map
@test linear_map(hcat(N(2)...), x) == Interval(N(2) * x.dat)
# alias for scale
@test linear_map(N(2), x) == Interval(N(2) * x.dat)

# concrete linear map with zonotope output
M2 = hcat(N[1, 2, 3])
Expand Down

2 comments on commit 4299e76

@schillic
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
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/83089

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 v2.7.6 -m "<description of version>" 4299e769395d522a9638372abc3f8348aa3bbfe0
git push origin v2.7.6

Please sign in to comment.