mm.math.atleast_3d¶
- math.atleast_3d(dtype=None)¶
Returns an array with at least three dimensions by eventually inserting new axes at the beginning. Note this is not the way atleast_3d works in numpy and tensorflow, where it adds at the beginning and/or end.
- Parameters:
array (
ndarray
[Tuple
[int
,...
],Union
[TypeVar
(R
,float16
,float32
,float64
),TypeVar
(C
,complex64
,complex128
),TypeVar
(Z
,int16
,int32
,int64
),TypeVar
(N
,uint16
,uint32
,uint64
)]]) – The array to convert.dtype – The data type of the array. If
None
, the returned array is of the same type as the given one.
- 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 with at least three dimensions.