REF: sct_maths: fixed #520, #522, #525
REF: sct_maths: fixed #520, #522, #525

Former-commit-id: 2088003323a2e4129be71903de534b175dc6ca98 [formerly ed2480e01802a91bf990dd91ab1f4728481714c0]
Former-commit-id: 44d457ad1465a7a2b9fb3044547a94cceec34272
Former-commit-id: f1cf1b6e408eb12a8cf8f6e0830486cd04264736
neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox