ak.to_torch =========== Defined in `awkward.operations.ak_to_torch `__ on `line 15 `__. .. py:function:: ak.to_torch(array) Converts an Awkward Array into a PyTorch Tensor, if possible. If ``array`` contains any other data types (RecordArray for example) the function raises a TypeError. :param array: Array-like data (anything :py:obj:`ak.to_layout` recognizes). :returns: A PyTorch tensor with the same data as ``array``, if the conversion is possible.