Returns a new LNSTensor with a dimension of size one inserted at the specified position.
- Parameters:
dim (int) – The dimension index at which to insert the new dimension.
- Returns:
A new LNSTensor with the specified dimension added.
- Return type:
LNSTensor