Back to NDArray Operations
alloc
Allocate an array with the given shape and dtype. Optionally fill with a value.
Syntax
alloc(shape: Tuple, dt: String) → r
Backends
TypeScriptnumwa
Description
Allocate an array with the given shape and dtype. Optionally fill with a value.
Parameters
| Name | Description |
|---|---|
| shape | Tuple of dimension sizes |
| dt | Element dtype as string |
Returns
New NDArray, zero-initialized or filled with the given value