Fill a pytree (recursive dict or list of dict or list) in place with the given arrays Non dict or list nodes are ignored
| 210 | // in place with the given arrays |
| 211 | // Non dict or list nodes are ignored |
| 212 | void tree_fill(nb::object& tree, const std::vector<mx::array>& values) { |
| 213 | size_t index = 0; |
| 214 | tree_visit_update( |
| 215 | tree, [&](nb::handle node) { return nb::cast(values[index++]); }); |
| 216 | } |
| 217 | |
| 218 | // Replace all the arrays from the src values with the dst values in the tree |
| 219 | void tree_replace( |
no test coverage detected