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

Function remove_keys

monai/data/utils.py:1501–1513  ·  view source on GitHub ↗

Remove keys from a dictionary. Operates in-place so nothing is returned. Args: data: dictionary to be modified. keys: keys to be deleted from dictionary. Returns: `None`

(data: dict, keys: list[str])

Source from the content-addressed store, hash-verified

1499
1500
1501def remove_keys(data: dict, keys: list[str]) -> None:
1502 """
1503 Remove keys from a dictionary. Operates in-place so nothing is returned.
1504
1505 Args:
1506 data: dictionary to be modified.
1507 keys: keys to be deleted from dictionary.
1508
1509 Returns:
1510 `None`
1511 """
1512 for k in keys:
1513 _ = data.pop(k, None)
1514
1515
1516def remove_extra_metadata(meta: dict) -> None:

Callers 1

remove_extra_metadataFunction · 0.85

Calls 1

popMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…