MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / __str__

Method __str__

linear_algebra_python/src/lib.py:64–68  ·  view source on GitHub ↗

returns a string representation of the vector

(self)

Source from the content-addressed store, hash-verified

62 else:
63 raise Exception("please give any vector")
64 def __str__(self):
65 """
66 returns a string representation of the vector
67 """
68 return "(" + ",".join(map(str, self.__components)) + ")"
69 def component(self,i):
70 """
71 input: index (start at 0)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected