diff --git a/docs/src/index.md b/docs/src/index.md index 093a3143..5ddae840 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -122,7 +122,7 @@ julia> R = sparsevec(I,V) The inverse of the [`sparse`](@ref) and [`sparsevec`](@ref) functions is [`findnz`](@ref), which retrieves the inputs used to create the sparse array. -[`findall(!iszero, x)`](@ref) returns the cartesian indices of non-zero entries in `x` +[`findall(!iszero, x)`](@ref) returns the Cartesian indices of non-zero entries in `x` (including stored entries equal to zero). ```jldoctest sparse_function diff --git a/src/higherorderfns.jl b/src/higherorderfns.jl index 92597959..5603d3e6 100644 --- a/src/higherorderfns.jl +++ b/src/higherorderfns.jl @@ -111,7 +111,7 @@ const SpBroadcasted2{Style<:SPVM,Axes,F,Args<:Tuple{SparseVecOrMat,SparseVecOrMa # (1) The definitions below provide a common interface to sparse vectors and matrices # sufficient for the purposes of map[!]/broadcast[!]. This interface treats sparse vectors -# as n-by-one sparse matrices which, though technically incorrect, is how broacast[!] views +# as n-by-one sparse matrices which, though technically incorrect, is how broadcast[!] views # sparse vectors in practice. @inline numrows(A::AbstractCompressedVector) = length(A) @inline numrows(A::AbstractSparseMatrixCSC) = size(A, 1) diff --git a/src/linalg.jl b/src/linalg.jl index a2f07b22..2a4c8db4 100644 --- a/src/linalg.jl +++ b/src/linalg.jl @@ -1413,7 +1413,7 @@ kron(a::_SparseKronGroup, b::Number) = a * b ## det, inv, cond -inv(A::AbstractSparseMatrixCSC) = error("The inverse of a sparse matrix can often be dense and can cause the computer to run out of memory. If you are sure you have enough memory, please either convert your matrix to a dense matrix, e.g. by calling `Matrix` or if `A` can be factorized, use `\\` on the dense identity matrix, e.g. `A \\ Matrix{eltype(A)}(I, size(A)...)` restrictions of `\\` on sparse lhs applies. Altenatively, `A\\b` is generally preferable to `inv(A)*b`") +inv(A::AbstractSparseMatrixCSC) = error("The inverse of a sparse matrix can often be dense and can cause the computer to run out of memory. If you are sure you have enough memory, please either convert your matrix to a dense matrix, e.g. by calling `Matrix` or if `A` can be factorized, use `\\` on the dense identity matrix, e.g. `A \\ Matrix{eltype(A)}(I, size(A)...)` restrictions of `\\` on sparse lhs applies. Alternatively, `A\\b` is generally preferable to `inv(A)*b`") # TODO diff --git a/src/solvers/cholmod.jl b/src/solvers/cholmod.jl index 075b2fcf..9c832ef7 100644 --- a/src/solvers/cholmod.jl +++ b/src/solvers/cholmod.jl @@ -404,7 +404,7 @@ Factor(FC::FactorComponent) = FC.F ################# # Dense wrappers -# The ifelse here may be unecessary. +# The ifelse here may be unnecessary. # nothing different actually occurs in cholmod_l_allocate vs cholmod_allocate AFAICT. # And CHOLMOD has no way of tracking the difference internally (no internal itype field). # This leads me to believe they can be mixed with long and int versions of sparse freely. diff --git a/src/solvers/umfpack.jl b/src/solvers/umfpack.jl index 9f0cd5e8..26d6c8d6 100644 --- a/src/solvers/umfpack.jl +++ b/src/solvers/umfpack.jl @@ -275,7 +275,7 @@ UmfpackWS(F::ATLU, refinement::Bool=has_refinement(F)) = UmfpackWS(F.parent, ref A shallow copy of UmfpackLU to use in multithreaded solve applications. This function duplicates the working space, control, info and lock fields. """ -# Not using simlar helps if the actual needed size has changed as it would need to be resized again +# Not using similar helps if the actual needed size has changed as it would need to be resized again Base.copy(F::UmfpackLU{Tv, Ti}, ws=UmfpackWS(F)) where {Tv, Ti} = UmfpackLU( F.symbolic, @@ -413,7 +413,7 @@ When `check = false`, responsibility for checking the decomposition's validity (via [`issuccess`](@ref)) lies with the user. The permutation `q` can either be a permutation vector or `nothing`. If no permutation vector -is proveded or `q` is `nothing`, UMFPACK's default is used. If the permutation is not zero based, a +is provided or `q` is `nothing`, UMFPACK's default is used. If the permutation is not zero based, a zero based copy is made. See also [`lu`](@ref) diff --git a/test/sparsematrix_constructors_indexing.jl b/test/sparsematrix_constructors_indexing.jl index 562a14c6..1ef19a1d 100644 --- a/test/sparsematrix_constructors_indexing.jl +++ b/test/sparsematrix_constructors_indexing.jl @@ -1077,7 +1077,7 @@ end @test Base.isstored(A, c[1], c[2]) == false end - # `isstored` for adjoint and tranposed matrices: + # `isstored` for adjoint and transposed matrices: for trans in (adjoint, transpose) B = trans(A) stored_indices = [CartesianIndex(j, i) for (j, i) in zip(J, I)] @@ -1390,7 +1390,7 @@ using Base: swaprows!, swapcols! (swaprows!, 2, 3), # Test swapping rows of unequal length (swaprows!, 2, 4), # Test swapping non-adjacent rows (swapcols!, 1, 2), # Test swapping columns where one column is fully sparse - (swapcols!, 2, 3), # Test swapping coulms of unequal length + (swapcols!, 2, 3), # Test swapping columns of unequal length (swapcols!, 2, 4)) # Test swapping non-adjacent columns Scopy = copy(S) Sdense = Array(S)