cf.Data.__len__

Data.__len__()[source]

Called to implement the built-in function len.

x.__len__() <==> len(x)

Performance

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

Examples

>>> len(cf.Data([1, 2, 3]))
3
>>> len(cf.Data([[1, 2, 3]]))
1
>>> len(cf.Data([[1, 2, 3], [4, 5, 6]]))
2
>>> len(cf.Data(1))
Traceback (most recent call last):
    ...
TypeError: len() of unsized object