Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ Deprecated or removed
* `readcsv(io[, T::Type]; opts...)` has been deprecated in favor of
`readdlm(io, ','[, T]; opts...)` ([#23530]).

* `sparse(s::UniformScaling, m::Integer)` has been deprecated in favor of the
three-argument equivalent `sparse(s::UniformScaling, m, n)` ([#24472]).

* The `cholfact`/`cholfact!` methods that accepted an `uplo` symbol have been deprecated
in favor of using `Hermitian` (or `Symmetric`) views ([#22187], [#22188]).

Expand Down
2 changes: 2 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1825,6 +1825,8 @@ function toc()
return t
end

@eval Base.SparseArrays @deprecate sparse(s::UniformScaling, m::Integer) sparse(s, m, m)

# A[I...] .= with scalar indices should modify the element at A[I...]
function Broadcast.dotview(A::AbstractArray, args::Number...)
depwarn("the behavior of `A[I...] .= X` with scalar indices will change in the future. Use `A[I...] = X` instead.", :broadcast!)
Expand Down
2 changes: 1 addition & 1 deletion base/sparse/sparsematrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ if not specified.
multiple `α` of the identity matrix.
"""
speye(::Type{T}, m::Integer, n::Integer) where {T} = SparseMatrixCSC{T}(UniformScaling(one(T)), Dims((m, n)))
sparse(s::UniformScaling, m::Integer, n::Integer=m) = SparseMatrixCSC(s, Dims((m, n)))
sparse(s::UniformScaling, m::Integer, n::Integer) = SparseMatrixCSC(s, Dims((m, n)))

function one(S::SparseMatrixCSC{T}) where T
m,n = size(S)
Expand Down
2 changes: 1 addition & 1 deletion test/sparse/spqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ nn = 100
end

# Make sure that conversion to Sparse doesn't use SuiteSparse's symmetric flag
@test qrfact(sparse(one(eltyA)I, 5))\ones(eltyA, 5) == ones(5)
@test qrfact(sparse(one(eltyA)I, 5, 5))\ones(eltyA, 5) == ones(5)
end

@testset "basic solution of rank deficient ls" begin
Expand Down