Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserWarning: The given NumPy array is not writable #31

Open
Selur opened this issue Jan 11, 2025 · 1 comment
Open

UserWarning: The given NumPy array is not writable #31

Selur opened this issue Jan 11, 2025 · 1 comment

Comments

@Selur
Copy link

Selur commented Jan 11, 2025

Would be nice if:

F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\ccrestoration\vs\convert.py:8: UserWarning: 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. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_numpy.cpp:209.)
[torch.from_numpy(np.asarray(frame[plane])).to(device) for plane in range(frame.format.num_planes)]

could be fixed.
It's not critical, but annoying. :)

@Tohrusky
Copy link
Member

Tohrusky commented Feb 2, 2025

warnings.filterwarnings("ignore", "The given NumPy array is not writable")

bury its head in the sand :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants