pyqubo.Array.T

Array.T

Returns a transposed array.

Example

>>> from pyqubo import Array
>>> array = Array.create('x', shape=(2, 3), vartype='BINARY')
>>> array
Array([[Binary(x[0][0]), Binary(x[0][1]), Binary(x[0][2])],
       [Binary(x[1][0]), Binary(x[1][1]), Binary(x[1][2])]])
>>> array.T
Array([[Binary(x[0][0]), Binary(x[1][0])],
       [Binary(x[0][1]), Binary(x[1][1])],
       [Binary(x[0][2]), Binary(x[1][2])]])