From 0df3da8f8cfca4158bd36f4302854f3eadeb747a Mon Sep 17 00:00:00 2001 From: tannevaled Date: Mon, 16 Nov 2026 00:08:37 +0100 Subject: [PATCH] docs: ndarray v0.46.0 Every mirrored page, hugo.yaml (version and baseURL /docs/0.46/) and the README now point at v0.46.0. Re-synced from the v0.46.0 source, the only mirrored one that changed since v0.45.0: performance.md (docs/perf.md: float64 Maximum/Minimum on go-simd/floats v0.26.0, 139-151 to 76-82 us per 1e5). The other pages are only relabelled. The table was not re-measured: the home page still quotes the one measured at 37c1b86 (185 slower, 54 faster, 17 tied). performance-history.md is left alone. Refs go-ndarray/ndarray#128 Co-Authored-By: Claude Sonnet 5.5 --- README.md | 2 +- content/en/accuracy.md | 2 +- content/en/dtypes.md | 2 +- content/en/linalg.md | 4 ++-- content/en/performance.md | 20 ++++++++++++++++---- content/en/random.md | 8 ++++---- content/en/roadmap.md | 4 ++-- content/en/security.md | 2 +- hugo.yaml | 4 ++-- 9 files changed, 30 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 5692968..cb2cf7b 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ describes**: | Source | Published under | | --- | --- | -| branch `main`, with `params.ndarray.version: v0.45.0` in `hugo.yaml` | `https://go-ndarray.github.io/docs//`, here `/docs/0.45/` | +| branch `main`, with `params.ndarray.version: v0.46.0` in `hugo.yaml` | `https://go-ndarray.github.io/docs//`, here `/docs/0.46/` | | the newest version | also `https://go-ndarray.github.io/docs/latest/` | `https://go-ndarray.github.io/docs/` redirects to `latest/`. Each push to diff --git a/content/en/accuracy.md b/content/en/accuracy.md index 77f8789..ad6df56 100644 --- a/content/en/accuracy.md +++ b/content/en/accuracy.md @@ -8,7 +8,7 @@ description: "What go-ndarray promises about its results: a stated error bound, tags: [accuracy, numpy, math/big] --- -> Mirrored from [`README.md`](https://github.com/go-ndarray/ndarray/blob/v0.45.0/README.md#accuracy-contract) at v0.45.0. +> Mirrored from [`README.md`](https://github.com/go-ndarray/ndarray/blob/v0.46.0/README.md#accuracy-contract) at v0.46.0. The contract is **correct, and as fast as possible**. "Correct" means a stated error bound, checked against an exact oracle. Equality with NumPy's bits is not the contract: wherever it holds today, it is how a function was ported, and a faster default that stays within its bound may replace it. diff --git a/content/en/dtypes.md b/content/en/dtypes.md index 61408d5..a94b0cf 100644 --- a/content/en/dtypes.md +++ b/content/en/dtypes.md @@ -8,7 +8,7 @@ description: "Why the dtype is a run-time property of one Array type, how arrays tags: [dtypes, numpy] --- -> Mirrored from [`docs/design-dtypes.md`](https://github.com/go-ndarray/ndarray/blob/v0.45.0/docs/design-dtypes.md) at v0.45.0. +> Mirrored from [`docs/design-dtypes.md`](https://github.com/go-ndarray/ndarray/blob/v0.46.0/docs/design-dtypes.md) at v0.46.0. > Status: implemented (Phase 2). Supersedes decision 4 of > [plan-ndarray.md](roadmap.md) ("`float64` first"). diff --git a/content/en/linalg.md b/content/en/linalg.md index 7ccc485..d58a2f5 100644 --- a/content/en/linalg.md +++ b/content/en/linalg.md @@ -8,9 +8,9 @@ description: "Solve, Inv, Det, Cholesky, QR, SVD, Eig and the rest of numpy.lina tags: [linalg, numpy] --- -> Mirrored from [`docs/linalg.md`](https://github.com/go-ndarray/ndarray/blob/v0.45.0/docs/linalg.md) at v0.45.0. +> Mirrored from [`docs/linalg.md`](https://github.com/go-ndarray/ndarray/blob/v0.46.0/docs/linalg.md) at v0.46.0. -Package [`linalg`](https://pkg.go.dev/github.com/go-ndarray/ndarray@v0.45.0/linalg) gives ndarray arrays the functions of +Package [`linalg`](https://pkg.go.dev/github.com/go-ndarray/ndarray@v0.46.0/linalg) gives ndarray arrays the functions of `numpy.linalg`, written in Go without cgo or assembly of its own: the matrix products it relies on are the packed SIMD GEMM of [go-blas/blas](https://github.com/go-blas/blas), which ndarray's `MatMul` uses too (the same kernels, moved there in v0.42.0, #122). diff --git a/content/en/performance.md b/content/en/performance.md index 25ac7b4..f2cdcff 100644 --- a/content/en/performance.md +++ b/content/en/performance.md @@ -8,11 +8,11 @@ description: "go-ndarray against the pinned NumPy on one core, both sides: the m tags: [performance, numpy, refbench] --- -> Mirrored from [`docs/perf.md`](https://github.com/go-ndarray/ndarray/blob/v0.45.0/docs/perf.md) at v0.45.0. +> Mirrored from [`docs/perf.md`](https://github.com/go-ndarray/ndarray/blob/v0.46.0/docs/perf.md) at v0.46.0. -The table is [perf-table.md](https://github.com/go-ndarray/ndarray/blob/v0.45.0/docs/perf-table.md), generated by +The table is [perf-table.md](https://github.com/go-ndarray/ndarray/blob/v0.46.0/docs/perf-table.md), generated by [refbench](https://github.com/go-scikit/refbench) (go-scikit/refbench v0.3.0) -from [perf.json](https://github.com/go-ndarray/ndarray/blob/v0.45.0/docs/perf.json); nothing in it is edited by hand. The rules are +from [perf.json](https://github.com/go-ndarray/ndarray/blob/v0.46.0/docs/perf.json); nothing in it is edited by hand. The rules are those of the go-scikit performance campaign ([go-scikit/roadmap#27](https://github.com/go-scikit/roadmap/issues/27)): @@ -36,7 +36,7 @@ those of the go-scikit performance campaign `TestRefSmoke` runs every NumPy call once. - **One case per public function** (a function with several shapes of use has several rows, `Array.SumAxis/axis0` and `/axis1`), or a named exemption with - its reason in [perf-exempt.md](https://github.com/go-ndarray/ndarray/blob/v0.45.0/docs/perf-exempt.md). CI fails on a public function + its reason in [perf-exempt.md](https://github.com/go-ndarray/ndarray/blob/v0.46.0/docs/perf-exempt.md). CI fails on a public function with neither. ## What a row times @@ -198,6 +198,18 @@ rounds: ns and `Real` from 84–91 µs to 101–104 ns, 803 kB to 128 B per call. The new table measures them against NumPy at 63 ns and 97 ns against 174 ns and 168 ns (ratios 0.36 and 0.58). This is a behaviour change (see the README). +- Float64 `Maximum` and `Minimum` run on the go-simd/floats v0.26.0 kernels + instead of the scalar builtin loop, in every path that calls them (same + shape, scalar and repeated operands, broadcast). The results are bit for bit + those of the builtin `max` and `min` for numbers and zeros; a NaN gives a NaN, + as before, and which NaN is target-dependent + (`TestMaximumMinimumFloats`). On 10⁵ float64 including the result + allocation, cfarm420, one pinned core, a test binary of main against one of + this change, four interleaved rounds of 1 s at load 3.6 to 4.0 + (`benchmarks/maxmin_bench_test.go`): `Maximum` went from 139–150 µs to + 76–82 µs and `Minimum` from 141–151 µs to 76–81 µs. The allocation is + unchanged, 2 per call and 803 kB. No NumPy ratio is claimed for these + numbers: the new table has not been run on this change. What remains of the allocation cause is Go's own cost. A CPU profile of a bare `make([]float64, 100000)` shows about 60% garbage-collector marking (assists diff --git a/content/en/random.md b/content/en/random.md index ebd060c..cedec28 100644 --- a/content/en/random.md +++ b/content/en/random.md @@ -8,9 +8,9 @@ description: "numpy.random with NumPy's numbers for the same seed: the bit gener tags: [random, numpy] --- -> Mirrored from [`docs/random.md`](https://github.com/go-ndarray/ndarray/blob/v0.45.0/docs/random.md) at v0.45.0. +> Mirrored from [`docs/random.md`](https://github.com/go-ndarray/ndarray/blob/v0.46.0/docs/random.md) at v0.46.0. -Package [`random`](https://pkg.go.dev/github.com/go-ndarray/ndarray@v0.45.0/random) is `numpy.random` over go-ndarray arrays. Its goal +Package [`random`](https://pkg.go.dev/github.com/go-ndarray/ndarray@v0.46.0/random) is `numpy.random` over go-ndarray arrays. Its goal is migration: a notebook moved from NumPy to Go keeps its numbers for the same seed. @@ -24,7 +24,7 @@ u, _ := random.Rand(3) // np.random.rand(3) ``` `Example`, `ExampleSeed` and `ExampleGenerator_ChoiceN` in -[`example_test.go`](https://github.com/go-ndarray/ndarray/blob/v0.45.0/random/example_test.go) print NumPy's own numbers. +[`example_test.go`](https://github.com/go-ndarray/ndarray/blob/v0.46.0/random/example_test.go) print NumPy's own numbers. ## What is implemented @@ -142,7 +142,7 @@ random arguments. Used as-is, that made 3% of `np.random.randn` values and 10% of `lognormal` values one ULP off. So `random` rounds `log`, `log1p`, `exp`, `expm1` and `pow` **correctly** -([`libm.go`](https://github.com/go-ndarray/ndarray/blob/v0.45.0/random/libm.go)): a fast evaluation to about 2⁻⁶⁸ with Ziv's +([`libm.go`](https://github.com/go-ndarray/ndarray/blob/v0.46.0/random/libm.go)): a fast evaluation to about 2⁻⁶⁸ with Ziv's rounding test, and a double-double fallback (about 2⁻¹⁰⁰) for the one argument in ~2¹⁵ that needs it. Checked against mpmath at 300 bits on 63,000 arguments (0 misrounded; the committed `libm.json` keeps 8,400), and the fast paths diff --git a/content/en/roadmap.md b/content/en/roadmap.md index c692dfe..a7d81e4 100644 --- a/content/en/roadmap.md +++ b/content/en/roadmap.md @@ -8,7 +8,7 @@ description: "The plan for go-ndarray and what ships today." tags: [roadmap] --- -> Mirrored from [`docs/plan-ndarray.md`](https://github.com/go-ndarray/ndarray/blob/v0.45.0/docs/plan-ndarray.md) at v0.45.0. +> Mirrored from [`docs/plan-ndarray.md`](https://github.com/go-ndarray/ndarray/blob/v0.46.0/docs/plan-ndarray.md) at v0.46.0. > Goal: a **pure-Go (CGO=0)** NumPy-style N-dimensional array library, as a > **standalone, reusable** module with correct scalar kernels now and a clean @@ -118,7 +118,7 @@ suite (plus the per-arch CI jobs already wired in `.github/workflows/ci.yml`). NumPy. What follows is the history of the levers behind the kernel seam, measured then against NumPy 2.2.4 (see [docs/perf.md](performance.md) and the repo's - [BENCHMARKS.md](https://github.com/go-ndarray/ndarray/blob/v0.45.0/BENCHMARKS.md)): + [BENCHMARKS.md](https://github.com/go-ndarray/ndarray/blob/v0.46.0/BENCHMARKS.md)): - **Multicore.** `Add/Sub/Mul/Div/Map`, `Sum/Max/Min`, the axis reductions, `Concatenate`/`Stack`, and the GEMM fan out across `GOMAXPROCS` above a size threshold (small arrays stay serial). Plus an allocation fix: the diff --git a/content/en/security.md b/content/en/security.md index 59bef9a..65f0ea9 100644 --- a/content/en/security.md +++ b/content/en/security.md @@ -8,7 +8,7 @@ description: "How to report a vulnerability, what the library guarantees, and th tags: [security] --- -> Mirrored from [`SECURITY.md`](https://github.com/go-ndarray/ndarray/blob/main/SECURITY.md) at v0.45.0. +> Mirrored from [`SECURITY.md`](https://github.com/go-ndarray/ndarray/blob/main/SECURITY.md) at v0.46.0. ## Reporting diff --git a/hugo.yaml b/hugo.yaml index 3dcb316..0af5480 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -6,7 +6,7 @@ # have used since the site was built with MkDocs and mike. The CI sets it # through --baseURL, from params.ndarray.version below. This default is the # same build. -baseURL: "https://go-ndarray.github.io/docs/0.45/" +baseURL: "https://go-ndarray.github.io/docs/0.46/" title: "go-ndarray" # themes/hextra is the tannevaled/hextra fork, pinned at a release tag: # upstream Hextra plus opt-in features (partial menu items, combos, @@ -100,7 +100,7 @@ params: # The ndarray release these pages describe. Its minor version is the # documentation's version label (v0.9.1 -> 0.9): the CI reads it here. ndarray: - version: "v0.45.0" + version: "v0.46.0" navbar: displayTitle: true