
Product
Introducing Supply Chain Attack Campaigns Tracking in the Socket Dashboard
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.
ndarray-function-basis
Advanced tools
Construct an basis ndarray given a list of values and functions
Construct an basis ndarray given a list of values and functions
This module extends the Vandermonde matrix to a list of numbers or functions. It constructs a set of basis vectors that can be used in a least squares curve fit. It's little more than a thin convenience wrapper around ndarray-fill.
require([dest, ]x, inputs)dest: a destination array. If not provided, an ndarray of type 'array' will be created. If provided, the first dimension must match the length of x, and the second must match the length of inputs.x: a ndarray of numbers at which the inputs are evaluatedinputs: an Array of either Functions or Numbers. If a Function, it is evaluated at x; if a Number, x is ignored for this input.For example, to construct a sinusoidal basis with period 2 * π and a constant offset,
var basis = require('ndarray-function-basis');
var ndarray = require('ndarray');
basis(ndarray([1, 2, 3, 4]), [1, Math.sin, Math.cos]);
// =>
// 1.000 0.841 0.540
// 1.000 0.909 -0.416
// 1.000 0.141 -0.990
// 1.000 -0.757 -0.654
(c) 2015 Ricky Reusser. MIT License
FAQs
Construct an basis ndarray given a list of values and functions
We found that ndarray-function-basis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Security News
Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.