optree v0.10.0
optree v0.10.0
Added
- Add
tree_ravel
function for JAX/NumPy/PyTorch array/tensor tree manipulation by @XuehaiPan in #100. - Expose node kind enum for
PyTreeSpec
by @XuehaiPan in #98. - Expose function
tree_flatten_one_level
by @XuehaiPan in #101. - Add tree broadcast functions
broadcast_common
,tree_broadcast_common
,tree_broadcast_map
, andtree_broadcast_map_with_path
by @XuehaiPan in #87. - Add function
tree_is_leaf
and addis_leaf
argument to functionall_leaves
by @XuehaiPan in #93. - Add methods
PyTreeSpec.entry
andPyTreeSpec.child
by @XuehaiPan in #88. - Add Python 3.12 support by @XuehaiPan in #90.
- Allow passing third-party dependency version from environment variable by @XuehaiPan in #80.
Changed
- Set recursion limit to 2000 for all platforms by @XuehaiPan in #97.
- Make
PyTreeSpec.is_prefix
to be consistent withPyTreeSpec.flatten_up_to
by @XuehaiPan in #94. - Decrease the
MAX_RECURSION_DEPTH
to 2000 on Windows by @XuehaiPan in #85. - Bump
abseil-cpp
version to 20230802.1 by @XuehaiPan in #80.
Fixed
- Memorize ongoing
repr
/hash
calls to resolve infinite recursion under self-referential case by @XuehaiPan and @JieRen98 in #82.
Removed
- Remove dependence on
abseil-cpp
by @XuehaiPan in #85.
Full Changelog: v0.9.2...v0.10.0