You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to add some option to the atleast_2d function so that you can specify where you'd like the newaxis to be placed? I'd like to be able to add the newaxis as the last dimension to force the array to a column vector.
My use case is that I want to have a column vector, but the input may appear as (N,k), or an (N,) array. If I use atleast_2d, then I would need to transpose the result if the original shape was (N,), but shouldn't transpose if the shape was already a column.
If A is 2D, it will get twice transposed, i.e. not touched at all. If A is 1D, transpose has no effect, so it makes it a row vector and then transposes to column vector.
Would it be possible to add some option to the
atleast_2d
function so that you can specify where you'd like thenewaxis
to be placed? I'd like to be able to add thenewaxis
as the last dimension to force the array to a column vector.My use case is that I want to have a column vector, but the input may appear as (N,k), or an (N,) array. If I use
atleast_2d
, then I would need to transpose the result if the original shape was (N,), but shouldn't transpose if the shape was already a column.Reproducing code example:
The text was updated successfully, but these errors were encountered: