From a9ea3fb59d02ba156d7656c125d9edd1448d5134 Mon Sep 17 00:00:00 2001 From: john verzani Date: Sat, 13 Jun 2020 07:11:53 -0400 Subject: [PATCH] close issue #359; tweak travis (#361) * close issue #359; tweak travis * test newer versions only * tweak twice --- .travis.yml | 8 ++------ Project.toml | 2 +- src/matrix.jl | 2 ++ test/test-matrix.jl | 7 +++++++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 88dbc60e..d8a186bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,14 +9,11 @@ julia: - 1.3 - 1.4 - nightly -git: - depth: 99999 + env: global: - PYTHON=conda - matrix: - - MPMATH=true - - MPMATH=false + notifications: email: false @@ -33,7 +30,6 @@ jobs: - GKSwstype="100" script: - julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); Pkg.develop(PackageSpec(path=pwd()))' - - julia --project=docs/ docs/make.jl after_success: skip after_success: diff --git a/Project.toml b/Project.toml index 5923002d..0f152152 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "SymPy" uuid = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" -version = "1.0.26" +version = "1.0.27" [deps] diff --git a/src/matrix.jl b/src/matrix.jl index 4262a0af..b6eee781 100644 --- a/src/matrix.jl +++ b/src/matrix.jl @@ -102,6 +102,8 @@ function LinearAlgebra.:\(A::AbstractArray{T,2}, B::AbstractArray{S,2}) where {T hcat([A \ bⱼ for bⱼ in eachcol(B)]...) end +## Issue #359 so that A + λI is of type Sym +Base.:+(A::AbstractMatrix{T}, I::UniformScaling) where {T <: SymbolicObject} = (n=LinearAlgebra.checksquare(A); A .+ I.λ*I(n)) ################################################## ## diff --git a/test/test-matrix.jl b/test/test-matrix.jl index fc0f79e8..c8cdc42b 100644 --- a/test/test-matrix.jl +++ b/test/test-matrix.jl @@ -138,4 +138,11 @@ using LinearAlgebra sin(ϕ) ρ*cos(ϕ)] @test X.jacobian(Y) == view(X, :, :).jacobian(view(Y, :, :)) + ## Issue #359 + if VERSION >= v"1.2" + @vars a + @test eltype([a 1; 1 a] + I) == Sym + @test eltype([a 1; 1 a] + 2I) == Sym + end + end