google-deepmind/tree
Fork: 58 Star: 944 (更新于 2024-11-15 12:15:42)
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-11-22 02:39:01 goauthentik/authentik
2024-11-22 00:03:47 comfyanonymous/ComfyUI
2024-11-21 22:06:18 rashevskyv/dbi
2024-11-21 21:09:02 xtekky/gpt4free
2024-11-21 20:03:58 ultralytics/ultralytics
2024-11-21 00:54:04 hect0x7/JMComic-Crawler-Python