LinearAlgebra.jl
LinearAlgebra.jl copied to clipboard
This behaviour is an abuse of notation (albeit a common one): ```julia julia> norm(x, 0.01) 4.4367778861406044e69 julia> norm(x, 0.001) Inf julia> norm(x, 0) 5.0 ``` The 0-norm should be `Inf`...
`svd`, `svdvals`, `svdvals!`, `rank` (and any functions that use these internally) do not support `BigFloat`. Presumably they also fail to support other non-`BlasReal` types. ```julia julia> svd(BigFloat.(rand(5,5))) ERROR: MethodError: no...
Consider calling `eigen` for a `ComplexF64` matrix which happens to be real-diagonal: ```julia julia> D = ComplexF64[1 0; 0 2]; julia> eigen(D) Eigen{ComplexF64, ComplexF64, Matrix{ComplexF64}, Vector{ComplexF64}} values: 2-element Vector{ComplexF64}: 1.0...
It seems that Diagonal matrices in LinearAlgebra do not fully implement the interface of `pinv`. There is an implementation of `pinv(D::Diagonal)` [here](https://github.com/JuliaLang/julia/blob/88a0627003c45ddac304b7be933c93caae8ae6b3/stdlib/LinearAlgebra/src/diagonal.jl#L686) and of `pinv(D::Diagonal, rtol)` just [below](https://github.com/JuliaLang/julia/blob/88a0627003c45ddac304b7be933c93caae8ae6b3/stdlib/LinearAlgebra/src/diagonal.jl#L701). There is...
The following simple sparse matrix (with Unitful matrix elements) causes `cholesky!` to overflow: ```julia using LinearAlgebra: cholesky using SparseArrays: spdiagm using Unitful: s A = spdiagm(Float32.(1:3)*s^2) # unitful sparse array...
We have `LinearAlgebra.Factorization`, but I don't think we currently have a method to access the factors, e.g. a `factorsof(X::Factorization)::Tuple` or so. This touches on JuliaLang/LinearAlgebra.jl#2 - it would be nice...
Right now, `LinearAlgebra.tr` only traces second-order tensors. However, it can be very useful to trace along a specific set of axes (e.g., for batched calculations), as well as ND traces...
It would be nice to create this matrix: ``` 1 0 0 -1 0 0 0 1 0 0 -1 0 0 0 1 0 0 -1 ``` with a...
When loading an external copy of LinearAlgebra (as in the tests for https://github.com/JuliaLang/LinearAlgebra.jl) there are some new method ambiguities that arises, even if the external copy should have the exact...
In scientific papers using matrices, you'll often see notation where block matrices consist of blocks such as **A** (a full matrix), but also **I** (an appropriately sized identity matrix), **0**...