torch.fx.experimental.unification.unification_tools.dissoc
-
torch.fx.experimental.unification.unification_tools.dissoc(d, *keys, **kwargs)[исходный код] -
Возвращает новый словарь, из которого удалены указанные ключи.
Из нового словаря удалён элемент d[key] для каждого указанного ключа. Исходный словарь не изменяется.
>>> dissoc({"x": 1, "y": 2}, "y") {'x': 1} >>> dissoc({"x": 1, "y": 2}, "y", "x") {} >>> dissoc({"x": 1}, "y") # Ignores missing keys {'x': 1}- Тип возвращаемого значения:
© 2026, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.14/generated/torch.fx.experimental.unification.unification_tools.dissoc.html