MCPcopy Index your code
hub / github.com/geekcomputers/Python / __eq__

Method __eq__

linear-algebra-python/src/lib.py:182–195  ·  view source on GitHub ↗

returns true if the vectors are equal otherwise false.

(self, other)

Source from the content-addressed store, hash-verified

180 return self
181
182 def __eq__(self, other):
183 """
184 returns true if the vectors are equal otherwise false.
185 """
186 ans = True
187 SIZE = self.size()
188 if SIZE == other.size():
189 for i in range(SIZE):
190 if self.__components[i] != other.component(i):
191 ans = False
192 break
193 else:
194 ans = False
195 return ans
196
197
198def zeroVector(dimension):

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.95
componentMethod · 0.45

Tested by

no test coverage detected