📖 INDEX
LOADING ENGINE...
np.random.randint()
AI & DATA SCIENCE // np-random-randint
Return random integers from low (inclusive) to high (exclusive).
Syntax
arr = np.random.randint(0, 10, size=(3, 3))Examples
Example 01Basic Usage
arr = np.random.randint(0, 10, size=(3, 3))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.