0 votes
in Python by
explain numpy.ndarray.T in Python

1 Answer

0 votes
by

numpy.ndarray.T in Python

The numpy.ndarray.T attribute makes a Transpose of an array having a dimension greater than or equal to 2.

Syntax

ndarray.T()

Parameter

NA

Return

This attribute returns the transpose of an array

Example 1

# Python Program explaining
# numpy.ndarray.T() function
import numpy as np
# creating an array
ndarray = np.array([[11, 12, 43], [24, 15, 56]])
# applying ndarray.T() fucntion
val = ndarray.T
print(val)

Output

[[11 24]
[12 15]
[43 56]]

Related questions

0 votes
asked May 19, 2022 in Python by john ganales
0 votes
asked May 19, 2022 in Python by john ganales
...