Torch.from_numpy not support negative strides

I think this is a more elegant solution to the problem leveraging the PyTorch API.

torch.flip(torch.from_numpy(x), dims=(0,))

2 Likes