📖 INDEX
LOADING ENGINE...
np.random.shuffle()
AI & DATA SCIENCE // np-random-shuffle
Modify a sequence in-place by shuffling its contents.
Syntax
np.random.shuffle(arr)Examples
Example 01Basic Usage
np.random.shuffle(arr)Best Practices
- Refer to the official NumPy documentation for deep vectorization techniques.
- Avoid writing custom Python for-loops for operations that can be vectorized with NumPy.