Help us shape the future of Go! Take the 2026 Go Developer Survey

genwrap

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Command genwrap writes symbols/zz_generics.go: the generic functions of go-statistics/stats, instantiated so that the interpreter can call them.

yaegi cannot export a generic function — there is no value to export until its type parameters are fixed — so `yaegi extract` leaves out every one of them, and stats is mostly generic: Mean[D Data], FitNormal[D Data], ... For each function whose type parameters are all constrained by stats.Data (= []float64 | *ndarray.Array), genwrap writes a wrapper where

  • a parameter of type D (or ...D) is an `any`, converted by symbols.Data: a []float64 or a *ndarray.Array of any shape and dtype, read in row-major order, as stats itself reads it;
  • every other use of D ([]D, a result D) is []float64.

A function with another kind of type parameter is reported and left out.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL