:py:mod:`pybaum.registry` ========================= .. py:module:: pybaum.registry Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: pybaum.registry.get_registry .. py:function:: get_registry(types=None, include_defaults=True) Create a pytree registry. :param types: A list strings with the names of types that should be included in the registry, i.e. considered containers and not leaves by the functions that work with pytrees. Currently we support: - "tuple" - "dict" - "list" - :class:`collections.namedtuple` or :class:`typing.NamedTuple` - :obj:`None` - :class:`collections.OrderedDict` - "numpy.ndarray" - "jax.numpy.ndarray" - "pandas.Series" - "pandas.DataFrame" :type types: list :param include_defaults: Whether the default pytree containers "tuple", "dict" "list", "None", "namedtuple" and "OrderedDict" should be included even if not specified in `types`. :type include_defaults: bool :returns: A pytree registry. :rtype: dict