MCPcopy Index your code
hub / github.com/gonum/gonum

github.com/gonum/gonum @v0.17.0

repository ↗ · DeepWiki ↗ · release v0.17.0 ↗ · Ask this repo → · + Follow
12,180 symbols 45,258 edges 1,364 files 5,287 documented · 43% 30 cross-repo links updated 2mo agov0.17.0 · 2026-01-10★ 8,406225 open issues
README

Gonum

Build status Build status codecov.io go.dev reference GoDoc Go Report Card stability-unstable

Installation

The core packages of the Gonum suite are written in pure Go with some assembly. Installation is done using go get.

go get -u gonum.org/v1/gonum/...

Supported Go versions

Gonum supports and tests using the gc compiler on the two most recent Go releases on Linux (386, amd64 and arm64), macOS and Windows (both on amd64).

Note that floating point behavior may differ between compiler versions and between architectures due to differences in floating point operation implementations.

Release schedule

The Gonum modules are released on a six-month release schedule, aligned with the Go releases. i.e.: when Go-1.x is released, Gonum-v0.n.0 is released around the same time. Six months after, Go-1.x+1 is released, and Gonum-v0.n+1.0 as well.

The release schedule, based on the current Go release schedule is thus:

  • Gonum-v0.n.0: February
  • Gonum-v0.n+1.0: August

Build tags

The Gonum packages use a variety of build tags to set non-standard build conditions. Building Gonum applications will work without knowing how to use these tags, but they can be used during testing and to control the use of assembly and CGO code.

The current list of non-internal tags is as follows:

  • safe — do not use assembly or unsafe
  • bounds — use bounds checks even in internal calls
  • noasm — do not use assembly implementations
  • tomita — use Tomita, Tanaka, Takahashi pivot choice for maximal clique calculation, otherwise use random pivot (only in topo package)

Issues TODOs

If you find any bugs, feel free to file an issue on the github issue tracker. Discussions on API changes, added features, code review, or similar requests are preferred on the gonum-dev Google Group.

https://groups.google.com/forum/#!forum/gonum-dev

License

Original code is licensed under the Gonum License found in the LICENSE file. Portions of the code are subject to the additional licenses found in THIRD_PARTY_LICENSES. All third party code is licensed either under a BSD or MIT license.

Code in graph/formats/dot is dual licensed Public Domain Dedication and Gonum License, and users are free to choose the license which suits their needs for this code.

The W3C test suites in graph/formats/rdf are distributed under both the W3C Test Suite License and the W3C 3-clause BSD License.

Extension points exported contracts — how you extend this code

Method (Interface)
Method is a type which can search for an optimum of an objective function. [9 implementers]
optimize/minimize.go
Statuser (Interface)
Statuser can report the status and any error. It is intended for methods as an additional error reporting mechanism apar [8 …
optimize/interfaces.go
Symmetric (Interface)
Symmetric represents a symmetric matrix (where the element at {i, j} equals the element at {j, i}). Symmetric matrices a [8 …
mat/symmetric.go
Banded (Interface)
Banded is a band matrix representation. [8 implementers]
mat/band.go
Matrix (Interface)
Matrix is the basic matrix interface type. [30 implementers]
mat/matrix.go
CUntransposer (Interface)
CUntransposer is a type that can undo an implicit transpose. [6 implementers]
mat/cmatrix.go
LogProber (Interface)
LogProber wraps the LogProb method. [26 implementers]
stat/distuv/interfaces.go
Sampler (Interface)
Sampler generates a batch of samples according to the rule specified by the implementing type. The number of samples gen [9 …
stat/sampleuv/sample.go

Core symbols most depended-on inside this repo

ID
called by 1064
graph/graphs/gen/gen.go
ID
called by 617
graph/testgraph/testgraph.go
NewDense
called by 540
mat/dense.go
Run
called by 406
optimize/minimize.go
Conj
called by 396
mat/cdense.go
Float64
called by 368
internal/testrand/rand.go
Max
called by 357
spatial/kdtree/kdtree.go
At
called by 341
mat/matrix.go

Shape

Function 6,212
Method 4,490
Struct 698
Interface 530
TypeAlias 237
FuncType 13

Languages

Go100%

Modules by API surface

internal/asm/f64/bench_other_test.go258 symbols
blas/gonum/level1float64_bench_test.go173 symbols
internal/asm/f32/bench_test.go169 symbols
internal/asm/c64/bench_test.go169 symbols
internal/asm/c128/bench_test.go169 symbols
blas/blas.go165 symbols
lapack/gonum/lapack_test.go133 symbols
floats/floats_test.go131 symbols
mat/dense_test.go116 symbols
optimize/functions/functions.go113 symbols
cmplxs/cmplxs_test.go111 symbols
stat/moments_bench_test.go100 symbols

Dependencies from manifests, versioned

codeberg.org/go-fonts/liberationv0.5.0 · 1×
codeberg.org/go-latex/latexv0.1.0 · 1×
codeberg.org/go-pdf/fpdfv0.10.0 · 1×
github.com/ajstarks/svgov0.0.0-2021102423504 · 1×
github.com/campoy/embedmdv1.0.0 · 1×
github.com/goccmack/goccv1.0.2 · 1×
github.com/golang/freetypev0.0.0-2017060900350 · 1×
github.com/pmezard/go-difflibv1.0.0 · 1×
golang.org/x/imagev0.25.0 · 1×
golang.org/x/modv0.23.0 · 1×
golang.org/x/syncv0.12.0 · 1×

For agents

$ claude mcp add gonum \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact