cf.Data.shape

Data.shape

Tuple of the data array’s dimension sizes.

Performance

If the shape of the data is unknown then it is calculated immediately by executing all delayed operations.

Examples

>>> d = cf.Data([[1, 2, 3], [4, 5, 6]])
>>> d.shape
(2, 3)
>>> d = cf.Data([[1, 2, 3]])
>>> d.shape
(1, 3)
>>> d = cf.Data([[3]])
>>> d.shape
(1, 1)
>>> d = cf.Data(3)
>>> d.shape
()