Import the library
Create your first array
Basic operations
numpy-ts supports element-wise arithmetic on arrays of any shape:Method chaining
When you import fromnumpy-ts (the full entry point), arrays are NDArray instances that support method chaining. This lets you write fluent, readable pipelines:
np.add, np.reshape, etc.) is also available as a method on NDArray.
Standalone functions (core)
If you usenumpy-ts/core for tree-shaking, the same operations are available as standalone functions:
NDArrayCore returned from numpy-ts/core still has properties like .shape, .dtype, .T, and .toString(). It only lacks the chainable operation methods (.add(), .reshape(), etc.). See the Tree-Shaking guide for a full comparison.Reductions
Reduce arrays along axes to compute statistics:Indexing and slicing
numpy-ts uses string-based slicing to emulate NumPy’s bracket syntax:Reshaping and manipulation
Linear algebra
Random numbers
Broadcasting
Operations automatically broadcast arrays with compatible shapes, just like NumPy:FFT (Fast Fourier Transform)
Print arrays
Next steps
Array Basics
Deep dive into NDArray properties, views, and copies.
Data Types
Learn about the 13 supported dtypes including complex numbers and BigInt.
Broadcasting
Understand how operations work across arrays of different shapes.