Last answered:

02 May 2023

Posted on:

29 Oct 2021

2

Transposing a vector How x_reshaped = x.reshape(1,3) makes a vector to 2D array

Q)) While transposing a vector .T doesnot work with the vector when applied reshape function it works, it is said that it converts that into a 2D array by applying x_reshaped = x.reshape(1,3) How ? PLease explain..

1 answers ( 0 marked as helpful)
Posted on:

02 May 2023

0

Matrix is represented as m*n, m=rows, n=columns, Vector will only be represented by either m rows or n columns, Hence reshapping will help in providing the matrix dimension m*n thats why Transpose works in a Matrix m*n not in a vector m or n

Submit an answer