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

Method __init__

monai/transforms/utility/dictionary.py:595–603  ·  view source on GitHub ↗
(
        self,
        keys: KeysCollection,
        dtype: np.dtype | None = None,
        wrap_sequence: bool = True,
        allow_missing_keys: bool = False,
    )

Source from the content-addressed store, hash-verified

593 backend = ToCupy.backend
594
595 def __init__(
596 self,
597 keys: KeysCollection,
598 dtype: np.dtype | None = None,
599 wrap_sequence: bool = True,
600 allow_missing_keys: bool = False,
601 ) -> None:
602 super().__init__(keys, allow_missing_keys)
603 self.converter = ToCupy(dtype=dtype, wrap_sequence=wrap_sequence)
604
605 def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Hashable, NdarrayOrTensor]:
606 d = dict(data)

Callers

nothing calls this directly

Calls 2

ToCupyClass · 0.90
__init__Method · 0.45

Tested by

no test coverage detected