wecopttool.atleast_2d
- atleast_2d(array)[source]
Ensure an array is at least 2D, otherwise add trailing dimensions to make it 2D.
This differs from
numpy.atleast_2d()
in that the additional dimensions are appended at the end rather than at the begining. This might be an option innumpy.atleast_2d()
in the future, see NumPy #12336.- Parameters:
array (ArrayLike) – Input array.
- Return type: