(array: np.ndarray)
return t.tensor(array, dtype=t.float32).to(default_device())
Convert numpy array to tensor on default device.

    :param array: Numpy array to convert.
    :return: PyTorch tensor on default device.
Convert numpy array to tensor on default device.
Convert numpy array to tensor on default device .
def to_tensor(array: np.ndarray) -> t.Tensor:
    """
    Convert numpy array to tensor on default device.

    :param array: Numpy array to convert.
    :return: PyTorch tensor on default device.
    """
    return t.tensor(array, dtype=t.float32).to(default_device())
def to_tensor ( array : np . ndarray ) -> t . Tensor : return t . tensor ( array , dtype = t . float32 ) . to ( default_device ( ) )