CERN / TIGRE

TIGRE: Tomographic Iterative GPU-based Reconstruction Toolbox
BSD 3-Clause "New" or "Revised" License
563 stars 186 forks source link

Fix numpy memory order issue #400

Closed pjueon closed 2 years ago

pjueon commented 2 years ago

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.

pjueon commented 2 years ago

@AnderBiguri Please let me know your thoughts. Adding the warning option might be a good idea I think.

AnderBiguri commented 2 years ago

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.