Hi Alexey,
Thank you very much for your reply. After some additional digging, I found the problem. I’m masking my MR image arrays with the np.ma.masked_array function, returning a MaskedArray datatype. I wasn’t able to find an explanation for this online, but torch.from_numpy doesn’t seem able to directly copy values from MaskedArray types. After first converting the MaskedArray to a normal numpy array using x=np.asarray(MaskedArray), the torch.from_numpy function works as intended.
Best,
Laurens