mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Fixes spelling error writeable to writable, improves warning, and documentation (#67664)
Summary: Fixes https://github.com/pytorch/pytorch/issues/46741 pytorchbot contributors: nickleus27, yanivsagy, and khanhthien123 SmrutiSikha this is mostly your work. We just did very minor clean up. cc mruberry Pull Request resolved: https://github.com/pytorch/pytorch/pull/67664 Reviewed By: gchanan Differential Revision: D32311838 Pulled By: mruberry fbshipit-source-id: 0e5d4d888caeccb0fd7c80e6ff11b1b1fa8e00d6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1e8f836c44
commit
f9ea41f257
@ -170,10 +170,10 @@ PyObject* tensor_to_numpy(const at::Tensor& tensor) {
|
||||
|
||||
void warn_numpy_not_writeable() {
|
||||
TORCH_WARN_ONCE(
|
||||
"The given NumPy array is not writeable, and PyTorch does "
|
||||
"not support non-writeable tensors. This means you can write to the "
|
||||
"underlying (supposedly non-writeable) NumPy array using the tensor. "
|
||||
"You may want to copy the array to protect its data or make it writeable "
|
||||
"The given NumPy array is not writable, and PyTorch does "
|
||||
"not support non-writable tensors. This means writing to this tensor "
|
||||
"will result in undefined behavior. "
|
||||
"You may want to copy the array to protect its data or make it writable "
|
||||
"before converting it to a tensor. This type of warning will be "
|
||||
"suppressed for the rest of this program.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user