Flattens input array from (N, …) to (N, -1) where all samples N have all data in their last dimension.
- Parameters:
- array : ArrayLike
Input array with shape (N, …)
- Returns:
Flattened array with shape (N, -1)
- Return type:
np.ndarray or torch.Tensor
- Raises:
TypeError – If array type is not supported