Skip to content
Snippets Groups Projects
Commit 4b4e3195 authored by Matthias Diener's avatar Matthias Diener
Browse files

Merge remote-tracking branch 'origin/main' into pytato

parents 63ec4f8e 54f368c7
No related branches found
No related tags found
No related merge requests found
...@@ -166,12 +166,13 @@ def map_array_container( ...@@ -166,12 +166,13 @@ def map_array_container(
:param ary: a (potentially nested) structure of :class:`ArrayContainer`\ s, :param ary: a (potentially nested) structure of :class:`ArrayContainer`\ s,
or an instance of a base array type. or an instance of a base array type.
""" """
if is_array_container(ary): try:
return deserialize_container(ary, [ ser_ctr = serialize_container(ary)
(key, f(subary)) for key, subary in serialize_container(ary) except TypeError:
])
else:
return f(ary) return f(ary)
else:
return deserialize_container(ary, [
(key, f(subary)) for key, subary in ser_ctr])
def multimap_array_container(f: Callable[..., Any], *args: Any) -> Any: def multimap_array_container(f: Callable[..., Any], *args: Any) -> Any:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment