Text of numpy.org › doc › stable › reference › generated › numpy.dtype.shape.html as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

numpy.dtype.shape — NumPy v2.5 Manual

Skip to main content GitHub numpy.dtype.shape # attribute dtype. shape # Shape tuple of the sub-array if this data type describes a sub-array, and () otherwise. Examples >>> import numpy as np >>> dt = np . dtype (( 'i4' , 4 )) >>> dt . shape (4,) >>> dt = np . dtype (( 'i4' , ( 2 , 3 ))) >>> dt . shape (2, 3) On this page