Skip to content

Conversation

@dkuegler
Copy link
Member

This PR fixes the following warning by manually converting to an ndarray

/fastsurfer/FastSurferCNN/run_prediction.py:243: 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 /pytorch/torch/csrc/utils/tensor_numpy.cpp:203.)

This Commit fixes the following warning by manually converting to a ndarray
```
/fastsurfer/FastSurferCNN/run_prediction.py:243: 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 /pytorch/torch/csrc/utils/tensor_numpy.cpp:203.)
```
@dkuegler
Copy link
Member Author

dkuegler commented Jan 21, 2026

The doc error is coming from somewhere else and should not be fixed in this PR, fixed in #765 .

@dkuegler dkuegler marked this pull request as ready for review January 21, 2026 20:24
@m-reuter m-reuter merged commit a2e1ffd into Deep-MI:dev Jan 21, 2026
1 of 2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants