optree v0.11.0
optree v0.11.0
Added
- Add function
is_namedtuple_instance
andis_structseq_instance
and result caches by @XuehaiPan in #121. - Add
tree_iter
function by @XuehaiPan in #130. - Add API to unregister node type in the registry by @XuehaiPan in #124.
- Add tree map functions with transposed outputs
tree_transpose_map
andtree_transpose_map_with_path
by @XuehaiPan in #127. - Add static constructors to create
PyTreeSpec
instances by @XuehaiPan in #120. - Cache intermediate
str
objects inPyObject_GetAttr
calls by @XuehaiPan in #106 and #109. - Install
clang-format
andclang-tidy
from PyPI by @XuehaiPan in #107. - Also check
_make
and_asdict
in functionis_namedtuple_class
by @XuehaiPan in #105.
Changed
- Set recursion limit to 1000 for all platforms by @XuehaiPan in #121.
- Allow types to be registered in both the global namespace and custom namespaces by @XuehaiPan in #124.
- Set
treespec_is_leaf
as strict by default by @XuehaiPan in #120. - Reorder functions for better code correspondence between C++ and Python by @XuehaiPan in #117.
- Standardize
py::handle
andpy::object
usage in function signature by @XuehaiPan in #115. - Reorder cases for
namedtuple
andPyStructSequence
types by @XuehaiPan in #111. - Use
__bases__
rather than__base__
in functionis_structseq_class
by @XuehaiPan in #104.
Fixed
- Fix potential segmentation fault when modifying
treespec.entries()
by @XuehaiPan in #116.
Full Changelog: v0.10.0...v0.11.0