Skip to main content

frombuffer

Interpret a buffer as a 1-D array.
Returns: NDArray — 1-D array created from the buffer data.

fromfile

Create an array from data in a file. This function requires Node.js file system access.
Returns: NDArray — 1-D array created from file data.
fromfile requires Node.js. It will throw an error in browser environments. Use numpy-ts/node for file I/O support.

fromfunction

Construct an array by executing a function over each coordinate. The function is called with N arguments (one per dimension) for each element, where each argument is the index along that dimension.
Returns: NDArray — Array of the given shape, with each element set to func(i, j, ...).

fromiter

Create a 1-D array from an iterable.
Returns: NDArray — 1-D array from the iterable values.

fromstring

Create a 1-D array from a string of numbers.
Returns: NDArray — 1-D array parsed from the string.

meshgrid

Breaking change in v1.4.0 for numpy-ts/core consumers. core/meshgrid previously had no options and effectively used 'ij' indexing. The new default is 'xy' (NumPy-compatible). If you relied on the old behavior, pass { indexing: 'ij' } explicitly:
Importers from numpy-ts (the full API) are unaffected — that wrapper already defaulted to 'xy'.
Return coordinate matrices from coordinate vectors. Given N 1-D arrays, meshgrid returns N N-D arrays for vectorized evaluations of N-D scalar fields.
Returns: NDArray[] — Array of N-D coordinate arrays, one per input.