Skip to content

Commit

Permalink
Merge pull request #829 from JuliaControl/polyfix
Browse files Browse the repository at this point in the history
handle breaking change in Polynomials
  • Loading branch information
baggepinnen authored Apr 19, 2023
2 parents 3a4d05e + 74740e8 commit 79672c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ControlSystemsBase/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "ControlSystemsBase"
uuid = "aaaaaaaa-a6ca-5380-bf3e-84a91bcd477e"
authors = ["Dept. Automatic Control, Lund University"]
repo = "https://github.com/JuliaControl/ControlSystemsBase.jl.git"
version = "1.4.1"
version = "1.4.2"

[deps]
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
Expand Down
2 changes: 1 addition & 1 deletion lib/ControlSystemsBase/src/types/conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function siso_tf_to_ss(T::Type, f::SisoRational)
N = length(den) - 1 # The order of the rational function f

# Get numerator coefficient of the same order as the denominator
bN = length(num) == N+1 ? num[1] : zero(num[1])
bN = length(num) == N+1 ? num[1] : zero(eltype(num))

@views if N == 0 #|| num == zero(Polynomial{T})
A = zeros(T, 0, 0)
Expand Down
5 changes: 5 additions & 0 deletions lib/ControlSystemsBase/test/test_conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,9 @@ s3,s4 = promote(s1,s2)
@test s3 == s4 == s2
@test typeof(s3) == typeof(s4) == typeof(s2)

# https://github.com/JuliaControl/ControlSystems.jl/issues/828
mytf = [tf(1,[1,1]) tf(0); tf(0) tf(1,[1,1])]
myss = ss(mytf)
@test myss == ss([-1 0; 0 -1],[1 0; 0 1],[1 0; 0 1],[0 0; 0 0])

end

2 comments on commit 79672c4

@baggepinnen
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=lib/ControlSystemsBase

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

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 ControlSystemsBase-v1.4.2 -m "<description of version>" 79672c44b373b7f388de3fa22056209843b06caf
git push origin ControlSystemsBase-v1.4.2

Please sign in to comment.