Skip to content

Latest commit

 

History

800 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SparseArrays

Documentation Build Status

SparseArrays.jl provides functionality for working with sparse arrays in Julia.

This package ships as part of the Julia stdlib, so its version is tied to the Julia version: each Julia release bundles a fixed copy, and it cannot be upgraded separately.

using SparseArrays, LinearAlgebra

A = sparse([1, 2, 3, 3], [1, 2, 1, 3], [4.0, 5.0, 1.0, 6.0])  # rows, columns, values
A[3, 1]          # 1.0
nnz(A)           # 4 stored entries
x = A \ ones(3)  # sparse direct solve through SuiteSparse

Contributing

See AGENTS.md for the conventions this repository follows. Development happens against Julia nightly. To run the tests, and to build the docs and run the doctests:

julia +nightly --project -e 'using Pkg; Pkg.test()'
julia +nightly --project=docs -e 'using Pkg; Pkg.develop(path="."); include("docs/make.jl")'

The second command edits docs/Project.toml; discard that change before committing.

Updating SuiteSparse

In order to upgrade SparseArrays.jl to use a new release of SuiteSparse, the following steps are necessary:

  1. Update SuiteSparse in Yggdrasil
  2. Update the SuiteSparse wrappers in SparseArrays.jl/gen and generate the new wrappers
  3. Run BumpStdlibs to update the SparseArrays.jl version in julia master
  4. Update the relevant stdlibs in Julia to pull in the new releases

About

SparseArrays.jl is a Julia stdlib for working with sparse matrices

Topics

Resources

Stars

107 stars

Watchers

10 watching

Forks

Used by

Contributors

Languages