📖 INDEX
LOADING ENGINE...
np.array()
AI & DATA SCIENCE // np-array
Creates an array from an array-like object (e.g., list or tuple).
Syntax
import numpy as np
arr = np.array([1, 2, 3])Examples
Example 01Basic Usage
import numpy as np
arr = np.array([1, 2, 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.