Closed pjueon closed 2 years ago
@AnderBiguri Please let me know your thoughts. Adding the warning option might be a good idea I think.
This looks good. I though about the warnings, and while its a good idea, I am not entirely sure where to put them... It should never happen inside algorithms anyway, so maybe we can just forget the warnings, its quite an edge case that the user will not have enough memory.
Ax
, but also all the cuda-numpy interface functions potentially have the same issue.)numpy.ascontiguousarray
returns a contiguous array. Deep copy only occurs if the memory order is not c-contiguous.I didn't added it but you can also add warnings when the deep copy occurs by checking
if img.flags['C_CONTIGUOUS']
if you want.