If no arrays are passed to torch.meshgrid a RuntimeError is raised whereas numpy returns an empty tuple.
import torch
torch.meshgrid()
raises:
RuntimeError: meshgrid expects a non-empty TensorList
Whereas with numpy:
import numpy as np
np.meshgrid()
returns:
I believe the numpy implementation is the correct output given the wording ("tuple of N arrays, where N is the number of provided one-dimensional input arrays") of the docstring for meshgrid.
If no arrays are passed to
torch.meshgridaRuntimeErroris raised whereas numpy returns an empty tuple.raises:
Whereas with numpy:
returns:
I believe the numpy implementation is the correct output given the wording ("tuple of N arrays, where N is the number of provided one-dimensional input arrays") of the docstring for meshgrid.