MCPcopy Create free account
hub / github.com/pydata/numexpr / _boolop

Function _boolop

numexpr3/ne3compiler.py:1360–1374  ·  view source on GitHub ↗

The equivalent AST factory for :code:`ast.Boolop` nodes to :code:`_binop`. :code:`ast.Boolop` nodes typically represent bitshift, bitand, and similar operations on integers. :code:`ast.Boolop` node fields are :code:`(left,op,right)`. Only one right-hand comparison is allowed,

(self: NumExpr, node: ast.AST)

Source from the content-addressed store, hash-verified

1358 return _binop(self, node)
1359
1360def _boolop(self: NumExpr, node: ast.AST) -> NumReg:
1361 '''
1362 The equivalent AST factory for :code:`ast.Boolop` nodes to :code:`_binop`.
1363 :code:`ast.Boolop` nodes typically represent bitshift, bitand, and similar
1364 operations on integers.
1365
1366 :code:`ast.Boolop` node fields are :code:`(left,op,right)`. Only one
1367 right-hand comparison is allowed, use brackets to break up multiple
1368 comparisons.
1369 '''
1370 if len(node.values) != 2:
1371 raise ValueError('NumExpr3 supports binary logical operations only, please separate operations with ().' )
1372 node.left = node.values[0]
1373 node.right = node.values[1]
1374 return _binop(self, node)
1375
1376def _unaryop(self: NumExpr, node: ast.AST) -> NumReg:
1377 '''

Callers

nothing calls this directly

Calls 1

_binopFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…