numpy.random.shuffle
is designed to work in-place meaning that it should return None
and instead modify your array.
import numpy as np
x = np.arange(9).reshape((3,3))
print(x)
# [[0 1 2]
# [3 4 5]
# [6 7 8]]
np.random.shuffle(x)
print(x)
# [[3 4 5]
# [0 1 2]
# [6 7 8]]