cf.Data.size

Data.size

Number of elements in the data array.

Performance

If the size 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.size
6
>>> d = cf.Data([[1, 2, 3]])
>>> d.size
3
>>> d = cf.Data([[3]])
>>> d.size
1
>>> d = cf.Data([3])
>>> d.size
1
>>> d = cf.Data(3)
>>> d.size
1