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

Former-commit-id: ed2480e01802a91bf990dd91ab1f4728481714c0
Former-commit-id: 44d457ad1465a7a2b9fb3044547a94cceec34272
3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox