educative.io

I can understand how the axes were used to change the dimensions from (3,4,2) to (4,2,3)

i can understand how the axes were used to change the dimensions from (3,4,2) to (4,2,3)
arr = np.arange(24)

arr = np.reshape(arr, (3, 4, 2))

print(arr)

print("---------------------------")

transposed = np.transpose(arr, axes=(1, 2, 0))

print(transposed)

print(‘arr shape: {}’.format(arr.shape))

print(‘transposed shape: {}’.format(transposed.shape))

Hi @Ambuj_Hakhu,

The shape of the array reveals the number of elements along each axis.

With the code above, The first dimension of arr becomes the third dimension of transposed , the second dimension of arr becomes the first dimension of transposed , and the third dimension of arr becomes the second dimension of transposed . Hence, the shape of transposed is (4, 2, 3).

Best Regards,
Hiba | Developer Advocate
educative.io

1 Like

@Hiba_Khurshid if I pay for a course certificate, will I have unlimited access to the course?

I actually got a free access to the course.
Thanks.

Hi @Chinazo_Anebelundu,

Buying a certificate doesn’t have any effect on course access. If you have access to a course, you will continue to have that after purchasing the certificate.

Best Regards,
Hiba | Developer Advocate
educative.io