MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __len__

Method __len__

linear_algebra/src/lib.py:60–64  ·  view source on GitHub ↗

returns the size of the vector

(self)

Source from the content-addressed store, hash-verified

58 self.__components = list(components)
59
60 def __len__(self) -> int:
61 """
62 returns the size of the vector
63 """
64 return len(self.__components)
65
66 def __str__(self) -> str:
67 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected