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

Method __init__

linear_algebra/src/lib.py:51–58  ·  view source on GitHub ↗

input: components or nothing simple constructor for init the vector

(self, components: Collection[float] | None = None)

Source from the content-addressed store, hash-verified

49 """
50
51 def __init__(self, components: Collection[float] | None = None) -> None:
52 """
53 input: components or nothing
54 simple constructor for init the vector
55 """
56 if components is None:
57 components = []
58 self.__components = list(components)
59
60 def __len__(self) -> int:
61 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected