Using existing numpy functions will allow to reduce the code and lead to easier maintenance, without reinventing the wheel.
Haven't extensively benchmarked but the tests run significantly faster on my system (from 2 sec to 25 msec ) using numpy functions. ( Please look at the attached files)
Duration of the test is timed using command
stdbuf -oL pytest test_mritopng.py --durations=0 > <filename>
Using existing numpy functions will allow to reduce the code and lead to easier maintenance, without reinventing the wheel.
Haven't extensively benchmarked but the tests run significantly faster on my system (from 2 sec to 25 msec ) using numpy functions. ( Please look at the attached files)
Duration of the test is timed using command
stdbuf -oL pytest test_mritopng.py --durations=0 > <filename>
master.log use-numpy.log