MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / to_tensor

Function to_tensor

util/smplx/smplx/utils.py:96–100  ·  view source on GitHub ↗
(array: Union[Array, Tensor], dtype=torch.float32)

Source from the content-addressed store, hash-verified

94
95
96def to_tensor(array: Union[Array, Tensor], dtype=torch.float32) -> Tensor:
97 if torch.is_tensor(array):
98 return array
99 else:
100 return torch.tensor(array, dtype=dtype)
101
102
103class Struct(object):

Callers 6

__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected