google-deepmind/tree
Fork: 58 Star: 947 (更新于 2024-12-08 12:16:29)
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最近更新仓库
2024-12-22 09:03:32 ultralytics/ultralytics
2024-12-21 13:26:40 notepad-plus-plus/nppPluginList
2024-12-21 11:42:53 XiaoMi/ha_xiaomi_home
2024-12-21 04:33:22 comfyanonymous/ComfyUI
2024-12-20 18:47:56 home-assistant/core
2024-12-20 15:41:40 jxxghp/MoviePilot