Published June 12, 2023
| Version v0.3.8
Software
Open
ASEM000/PyTreeClass: v0.3.8
Description
What's Changed
- Match named leaves with regular expressions by @ASEM000 in https://github.com/ASEM000/PyTreeClass/pull/70
Example:
Update all leaves starting with weight_
import pytreeclass as pytc
class Tree(pytc.TreeClass):
weight_1: float = 1.0
weight_2: float = 2.0
weight_3: float = 3.0
bias: float = 0.0
tree = Tree()
tree.at[pytc.RegexKey(r"weight_.*")].set(100.0)
# Tree(weight_1=100.0, weight_2=100.0, weight_3=100.0, bias=0.0)
Full Changelog: https://github.com/ASEM000/PyTreeClass/compare/v0.3.7...v0.3.8
Files
ASEM000/PyTreeClass-v0.3.8.zip
Files
(342.7 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:73c850aec82257070709e7666eeaa471
|
342.7 kB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/ASEM000/PyTreeClass/tree/v0.3.8 (URL)