class_docstr: Term binding to a numexpr expression.
  
  Parameters
  ----------
  expr : string
      A string suitable for passing to numexpr.  All variables in 'expr'
      should be of the form "x_i", where i is the index of the corresponding
      factor input in 'binds'.
  binds : tuple
      A tuple of factors to use as inputs.
  dtype : np.dtype
      The dtype for the expression.
class_docstr_tok: ["Term","binding","to","a","numexpr","expression",".","Parameters","--","--","--","--","--","expr",":","string","A","string","suitable","for","passing","to","numexpr",".","All","variables","in","'expr'","should","be","of","the","form","``","x_i","''",",","where","i","is","the","index","of","the","corresponding","factor","input","in","'binds","'",".","binds",":","tuple","A","tuple","of","factors","to","use","as","inputs",".","dtype",":","np.dtype","The","dtype","for","the","expression","."]
docstr: Compute new expression strings and a new inputs tuple for combining
  self and other with a binary operator.
docstr_tok: ["Compute","new","expression","strings","and","a","new","inputs","tuple","for","combining","self","and","other","with","a","binary","operator","."]
code: def build_binary_op(self, op, other):
      """
      Compute new expression strings and a new inputs tuple for combining
      self and other with a binary operator.
      """
      if isinstance(other, NumericalExpression):
          self_expr, other_expr, new_inputs = self._merge_expressions(
              other
          )
      elif isinstance(other, Term):
          self_expr = self._expr
          new_inputs, other_idx = _ensure_element(self.inputs, other)
          other_expr = "x_%d" % other_idx
      elif isinstance(other, Number):
          self_expr = self._expr
          other_expr = str(other)
          new_inputs = self.inputs
      else:
          raise BadBinaryOperator(op, self, other)
  
      # If the merged inputs would be too many for numexpr, then don't merge
      # them:
      if len(new_inputs) >= NPY_MAXARGS:
          self_expr = "x_0"
          other_expr = "x_1"
          new_inputs = self, other
  
      return self_expr, other_expr, new_inputs
  
imports: import re
  from itertools import chain
  from numbers import Number
  import numexpr
  from numexpr.necompiler import getExprNames
  from numpy import full, inf
  from zipline.pipeline.term import Term, ComputableTerm
  from zipline.utils.numpy_utils import bool_dtype
label_desc: Use image node_id 8 for calling the NumericalExpression obj's underlying member method code with example usage: obj.build_binary_op(op, other) and returns: self_expr,  other_expr,  new_inputs