You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, numpy.random.shuffle only supports shuffling along the first axis only. Many other Numpy functions support the axis keyword argument to specify the axis along which the respective operation should be applied, it would be great to have such an argument for this function as well.
The text was updated successfully, but these errors were encountered:
import numpy as np
a = np.arange(40).reshape((5,8))
# shuffle along axis 1
np.apply_along_axis(np.random.shuffle,1,a)
# shuffle along axis 0
np.random.shuffle(a)
print(a)
Currently,
numpy.random.shuffle
only supports shuffling along the first axis only. Many other Numpy functions support theaxis
keyword argument to specify the axis along which the respective operation should be applied, it would be great to have such an argument for this function as well.The text was updated successfully, but these errors were encountered: