Back to Numerical Arrays (NumPy)
np.array
Create an NDArray from a nested array or flat array with shape.
Syntax
np.array(data, shape?, options?)
Description
Create an NDArray from a nested array or flat array with shape.
Parameters
| Name | Description |
|---|---|
| data | - Nested array or flat array of numbers |
| shape(optional) | - Optional shape (inferred from nested structure if not provided) |
| options(optional) | - Optional configuration (dtype) |
Returns
Promise<NDArray>