MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / sorted_dict

Function sorted_dict

monai/data/utils.py:1401–1405  ·  view source on GitHub ↗

Return a new sorted dictionary from the `item`.

(item, key=None, reverse=False)

Source from the content-addressed store, hash-verified

1399
1400
1401def sorted_dict(item, key=None, reverse=False):
1402 """Return a new sorted dictionary from the `item`."""
1403 if not isinstance(item, dict):
1404 return item
1405 return {k: sorted_dict(v) if isinstance(v, dict) else v for k, v in sorted(item.items(), key=key, reverse=reverse)}
1406
1407
1408def convert_tables_to_dicts(

Callers 1

pickle_hashingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…