Back to Numerical Arrays (NumPy)
np.ones_like
Create an array of ones with the same shape and type as a given array.
Syntax
np.ones_like(a)
Description
Create an array of ones with the same shape and type as a given array.
Parameters
| Name | Description |
|---|---|
| a | - Reference array |
Returns
Promise<NDArray>