Searched refs:leaf_predicate (Results 1 – 2 of 2) sorted by relevance
89 absl::optional<pybind11::function> leaf_predicate = absl::nullopt);94 absl::optional<pybind11::function> leaf_predicate = absl::nullopt);
111 absl::optional<py::function> leaf_predicate) { in FlattenInto() argument115 if (leaf_predicate && (*leaf_predicate)(handle).cast<bool>()) { in FlattenInto()119 auto recurse = [this, &leaf_predicate, &leaves](py::handle child) { in FlattenInto()120 FlattenInto(child, leaves, leaf_predicate); in FlattenInto()177 PyTreeDef::Flatten(py::handle x, absl::optional<py::function> leaf_predicate) { in Flatten() argument180 tree->FlattenInto(x, leaves, leaf_predicate); in Flatten()