About 930,000 results
Open links in new tab
  1. How does NumPy's transpose() method permute the axes of an array?

    Aug 16, 2015 · How does NumPy's transpose () method permute the axes of an array? Asked 10 years, 4 months ago Modified 3 years, 10 months ago Viewed 140k times

  2. python - Transposing a 1D NumPy array - Stack Overflow

    May 11, 2011 · Instead, you can transpose a "row-vector" (numpy array of shape (1, n)) into a "column-vector" (numpy array of shape (n, 1)). To achieve this you have to first convert your 1D numpy array …

  3. numpy - How to understand transpose operation on a 3D or Higher ...

    Jun 5, 2024 · transposed_3d = np.transpose(array_3d) transposed_3d.shape = (2, 2, 3) transposed_3d = [ [[ 0, 4, 8], [ 2, 6, 10]], [[ 1, 5, 9], [ 3, 7, 11]] ] In case of 2D array it's easy to identify that rows …

  4. What's the difference of numpy.ndarray.T and …

    Jan 18, 2011 · The document numpy.ndarray.T says ndarray.T — Same as self.transpose (), except that self is returned if self.ndim < 2. Also, ndarray.transpose (*axes) says For a 1-D array, this has no effect.

  5. Numpy transpose of 1D array not giving expected result

    NumPy's transpose() effectively reverses the shape of an array. If the array is one-dimensional, this means it has no effect. In NumPy, the arrays

  6. python - How to transpose a 3D matrix? - Stack Overflow

    Nov 27, 2017 · I have a 3D matrix x_test of size (100, 33, 66) and I want to change its dimensions to (100, 66, 33). What is the most efficient way to do this using python3.5? I look for something along …

  7. How to transpose a 2D array using numpy? - Stack Overflow

    Mar 9, 2021 · Mostly duplicate of python - How to flip numpy array along the diagonal efficiently? - Stack Overflow , although the answers there are terrible.

  8. How does numpy.transpose work for this example? - Stack Overflow

    Oct 13, 2015 · How does numpy.transpose work for this example? Asked 10 years, 1 month ago Modified 4 years, 6 months ago Viewed 9k times

  9. ipython - Transpose of a vector using numpy - Stack Overflow

    Oct 8, 2013 · I am having an issue with Ipython - Numpy. I want to do the following operation: x^T.x with and x^T the transpose operation on vector x. x is extracted from a txt file with the instruction: x = np.

  10. python - Rearranging axes in numpy? - Stack Overflow

    Aug 10, 2019 · There are two options: np.moveaxis and np.transpose. np.moveaxis(a, sources, destinations) docs This function can be used to rearrange specific dimensions of an array. For …