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

Function clone

tests/test_utils.py:110–120  ·  view source on GitHub ↗

Clone data independent of type. Args: data (NdarrayTensor): This can be a Pytorch Tensor or numpy array. Returns: Any: Cloned data object

(data: NdarrayTensor)

Source from the content-addressed store, hash-verified

108
109
110def clone(data: NdarrayTensor) -> NdarrayTensor:
111 """
112 Clone data independent of type.
113
114 Args:
115 data (NdarrayTensor): This can be a Pytorch Tensor or numpy array.
116
117 Returns:
118 Any: Cloned data object
119 """
120 return copy.deepcopy(data)
121
122
123def assert_allclose(

Callers 2

test_correct_resultsMethod · 0.90
test_correct_resultsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…