docstr: Computes the leave index for all trees.
docstr_tok: ["Computes","the","leave","index","for","all","trees","."]
code: def leave_index_tree(self, X: np.ndarray) -> np.ndarray:
      """Computes the leave index for all trees."""
      if len(X.shape) == 1:
          X = X.reshape((1, -1))
      outputs = []
      for row in X:
          outs = []
          for tree_id in self.tree_ids:
              outs.append(self.leaf_index_tree(row, tree_id))
          outputs.append(outs)
      return np.array(outputs)
  
file_path: onnx/onnx/reference/ops/aionnxml/op_tree_ensemble_helper.py
imports: import numpy
label_desc: Use image node_id 4 for calling the TreeEnsemble obj's underlying member method code with example usage: obj.leave_index_tree(X) and returns: np