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: Ensure that our expression string has variables of the form x_0, x_1,
  ... x_(N - 1), where N is the length of our inputs.
docstr_tok: ["Ensure","that","our","expression","string","has","variables","of","the","form","x_0",",","x_1",",","...","x_","(","N","-","1",")",",","where","N","is","the","length","of","our","inputs","."]
code: def _validate(self):
      """
      Ensure that our expression string has variables of the form x_0, x_1,
      ... x_(N - 1), where N is the length of our inputs.
      """
      variable_names, _unused = getExprNames(self._expr, {})
      expr_indices = []
      for name in variable_names:
          if name == "inf":
              continue
          match = _VARIABLE_NAME_RE.match(name)
          if not match:
              raise ValueError("%r is not a valid variable name" % name)
          expr_indices.append(int(match.group(2)))
  
      expr_indices.sort()
      expected_indices = list(range(len(self.inputs)))
      if expr_indices != expected_indices:
          raise ValueError(
              "Expected %s for variable indices, but got %s"
              % (
                  expected_indices,
                  expr_indices,
              )
          )
      super(NumericalExpression, self)._validate()
  
imports: from itertools import chain
  import re
  from numbers import Number
  import numexpr
  from numexpr.necompiler import getExprNames
  from numpy import full, inf
  from catalyst.pipeline.term import Term, ComputableTerm
label_desc: Use image node_id 4 for calling the NumericalExpression obj's underlying member method code with example usage: obj._validate() without return types