Skip to content

Commit cb0521b

Browse files
update dependencies (#62)
* update dependencies * update CI julia versions * only test on 1.0 and latest * fix tests * add tests and bump version * rm Manifest.toml Co-authored-by: Sheehan Olver <[email protected]>
1 parent f893fb3 commit cb0521b

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
version:
16-
- '0.7'
1716
- '1.0'
18-
- '1.1'
19-
- '1.2'
17+
- '1'
2018
# - 'nightly'
2119
os:
2220
- ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
demos/*/*/*.png
22
data/SpectraDatabase
33
.DS_Store
4+
Manifest.toml

Project.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "RandomMatrices"
22
uuid = "2576dda1-a324-5b11-aa66-c48ed7e3c618"
3-
version = "0.5.0"
3+
version = "0.5.1"
44

55
[deps]
66
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
@@ -14,10 +14,10 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
1414
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1515

1616
[compat]
17-
Combinatorics = "≥ 0.7.0"
17+
Combinatorics = "≥ 0.7.0, 1"
1818
Distributions = "≥ 0.16.0"
19-
FastGaussQuadrature = "≥ 0.3.0"
20-
GSL = "≥ 0.4.0"
21-
Requires = "≥ 0.5.0"
22-
SpecialFunctions = "≥ 0.7.0"
19+
FastGaussQuadrature = "≥ 0.3.0, 0.4"
20+
GSL = "≥ 0.4.0, 1"
21+
Requires = "≥ 0.5.0, 1"
22+
SpecialFunctions = "≥ 0.7.0, 1"
2323
julia = "≥ 0.7.0"

src/FormalPowerSeries.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ FormalPowerSeries(v::Vector{T}) where T = FormalPowerSeries{T}(v)
3737
#Convenient abbreviation for floats
3838
fps = FormalPowerSeries{Float64}
3939

40-
zero(P::FormalPowerSeries{T}) where {T} = FormalPowerSeries(T[])
41-
one(P::FormalPowerSeries{T}) where {T} = FormalPowerSeries(T[1])
40+
zero(::Type{FormalPowerSeries{T}}) where {T} = FormalPowerSeries(T[])
41+
one(::Type{FormalPowerSeries{T}}) where {T} = FormalPowerSeries(T[1])
42+
zero(::FormalPowerSeries{T}) where {T} = zero(FormalPowerSeries{T})
43+
one(::FormalPowerSeries{T}) where {T} = one(FormalPowerSeries{T})
4244

4345
#Return truncated vector with c[i] = P[n[i]]
4446
function tovector(P::FormalPowerSeries{T}, n::AbstractVector{Index}) where {T,Index<:Integer}

test/FormalPowerSeries.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,11 @@ end
7676
#Test chain rule [H, Sec.1.6, p.40]
7777
@test derivative(compose(X,Y)) == compose(derivative(X),Y)*derivative(Y)
7878

79+
# zero and one elements
80+
x = FormalPowerSeries([1,2,3])
81+
@test zero(x) == FormalPowerSeries{Int64}(Dict{BigInt, Int64}())
82+
@test zero(typeof(x)) == FormalPowerSeries{Int64}(Dict{BigInt, Int64}())
83+
@test one(x) == FormalPowerSeries{Int64}(Dict{BigInt, Int64}(0 => 1))
84+
@test one(typeof(x)) == FormalPowerSeries{Int64}(Dict{BigInt, Int64}(0 => 1))
85+
7986
end # testset

0 commit comments

Comments
 (0)