Skip to content

Commit e4eab02

Browse files
zasdfgbnmsoumith
authored andcommitted
improvement
1 parent a8956f5 commit e4eab02

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

aten/src/ATen/native/TensorShape.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ std::vector<Tensor> meshgrid(TensorList tensors) {
618618
shape[i] = tensors[i].size(0);
619619
break;
620620
default:
621-
AT_ERROR("input tensor of meshgrid must be scalar or vector");
621+
AT_ERROR("Expected scalar or 1D tensor in the tensor list but got: ", tensors[i]);
622622
}
623623
}
624624
std::vector<Tensor> grids;

torch/_torch_docs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5839,9 +5839,9 @@ def parse_kwargs(desc):
58395839
r"""
58405840
meshgrid(seq) -> seq
58415841
5842-
Take a sequence of :math:`N` tensors, each of which be either scalar or 1-dimensional vector,
5843-
and create :math:`N` grids, where the :math:`i`th grid is defined by expanding the :math:`i`th
5844-
input over dimensions defined by other inputs.
5842+
Take a sequence of :math:`N` tensors, each of which can be either scalar or 1-dimensional
5843+
vector, and create :math:`N` N-dimensional grids, where the :math:`i`th grid is defined by
5844+
expanding the :math:`i`th input over dimensions defined by other inputs.
58455845
58465846
Arguments:
58475847
seq (sequence of Tensors): sequence of scalars or 1 dimensional tensors. Scalars will be

0 commit comments

Comments
 (0)