MCPcopy Create free account
hub / github.com/numpy/numpy / contains

Method contains

numpy/f2py/symbolic.py:716–730  ·  view source on GitHub ↗

Check if self contains other.

(self, other)

Source from the content-addressed store, hash-verified

714 raise NotImplementedError(f'traverse method for {self.op}')
715
716 def contains(self, other):
717 """Check if self contains other.
718 """
719 found = []
720
721 def visit(expr, found=found):
722 if found:
723 return expr
724 elif expr == other:
725 found.append(1)
726 return expr
727
728 self.traverse(visit)
729
730 return len(found) != 0
731
732 def symbols(self):
733 """Return a set of symbols contained in self.

Callers 1

analyzevarsFunction · 0.80

Calls 1

traverseMethod · 0.95

Tested by

no test coverage detected