(self)
| 10 | |
| 11 | class TestTreeUtils(mlx_tests.MLXTestCase): |
| 12 | def test_tree_map(self): |
| 13 | tree = {"a": 0, "b": 1, "c": 2} |
| 14 | tree = mlx.utils.tree_map(lambda x: x + 1, tree) |
| 15 | |
| 16 | expected_tree = {"a": 1, "b": 2, "c": 3} |
| 17 | self.assertEqual(tree, expected_tree) |
| 18 | |
| 19 | def test_tree_flatten(self): |
| 20 | tree = [{"a": 1, "b": 2}, "c"] |
nothing calls this directly
no outgoing calls
no test coverage detected