google-deepmind/tree
Fork: 58 Star: 959 (更新于 2025-01-15 15:40:13)
license: Apache-2.0
Language: Python .
tree is a library for working with nested data structures
最后发布版本: 0.1.8 ( 2022-12-18 17:35:28)
Tree
tree
is a library for working with nested data structures. In a way, tree
generalizes the builtin map
function which only supports flat sequences,
and allows to apply a function to each "leaf" preserving the overall
structure.
>>> import tree
>>> structure = [[1], [[[2, 3]]], [4]]
>>> tree.flatten(structure)
[1, 2, 3, 4]
>>> tree.map_structure(lambda v: v**2, structure)
[[1], [[[4, 9]]], [16]]
tree
is backed by an optimized C++ implementation suitable for use in
demanding applications, such as machine learning models.
Installation
From PyPI:
$ pip install dm-tree
Directly from github using pip:
$ pip install git+git://github.com/deepmind/tree.git
Build from source:
$ python setup.py install
Support
If you are having issues, please let us know by filing an issue on our issue tracker.
License
The project is licensed under the Apache 2.0 license.
最近版本更新:(数据更新于 2024-10-11 10:09:54)
2022-12-18 17:35:28 0.1.8
2022-04-11 16:44:01 0.1.7
2021-04-12 19:32:09 0.1.6
2021-04-07 22:49:52 0.1.2
2021-04-07 22:49:47 0.1.3
2021-04-07 22:49:14 0.1.4
2021-03-25 04:29:05 0.1.5
2019-11-08 00:10:25 0.1.1
2019-11-06 00:44:57 0.1.0
google-deepmind/tree同语言 Python最近更新仓库
2025-01-18 21:26:31 sunnypilot/sunnypilot
2025-01-17 23:34:10 Skyvern-AI/skyvern
2025-01-17 19:49:33 ultralytics/ultralytics
2025-01-17 19:12:03 XiaoMi/ha_xiaomi_home
2025-01-17 08:27:45 comfyanonymous/ComfyUI
2025-01-17 04:56:19 QuivrHQ/MegaParse