mm.math.ones¶
- math.ones(dtype=None)¶
Returns an array of ones with the given
shape
anddtype
.- Parameters:
shape (tuple) – shape of the array
dtype (type) – dtype of the array. If
None
, the returned array is of typefloat
.
- Return type:
ndarray
[Tuple
[int
,...
],Union
[TypeVar
(R
,float16
,float32
,float64
),TypeVar
(C
,complex64
,complex128
),TypeVar
(Z
,int16
,int32
,int64
),TypeVar
(N
,uint16
,uint32
,uint64
)]]- Returns:
The array of ones
code/api/mrmustard.math.ones
Download Python script
Download Notebook
View on GitHub