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

Class _Pair

numpy/f2py/symbolic.py:1283–1299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1281
1282
1283class _Pair:
1284 # Internal class to represent a pair of expressions
1285
1286 def __init__(self, left, right):
1287 self.left = left
1288 self.right = right
1289
1290 def substitute(self, symbols_map):
1291 left, right = self.left, self.right
1292 if isinstance(left, Expr):
1293 left = left.substitute(symbols_map)
1294 if isinstance(right, Expr):
1295 right = right.substitute(symbols_map)
1296 return _Pair(left, right)
1297
1298 def __repr__(self):
1299 return f'{type(self).__name__}({self.left}, {self.right})'
1300
1301
1302class _FromStringWorker:

Callers 2

substituteMethod · 0.85
processMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected