📖 INDEX
LOADING ENGINE...
ndarray.shape
AI & DATA SCIENCE // ndarray-shape
Tuple of array dimensions.
Syntax
print(arr.shape) # e.g., (3, 4)Examples
Example 01Basic Usage
print(arr.shape) # e.g., (3, 4)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.