ak.from_torch#

Defined in awkward.operations.ak_from_torch on line 12.

ak.from_torch(array)#
Parameters:

array – (PyTorch Tensor): Tensor to convert into an Awkward Array.

Converts a PyTorch Tensor into an Awkward Array.

If array contains any other data types the function raises an error.