Here are the examples of the python api numpy.np_log10 taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
Project: spinalcordtoolbox Source File: sct_utils.py
def check_if_same_space(fname_1, fname_2):
from msct_image import Image
from numpy import min, nonzero, all, around
from numpy import abs as np_abs
from numpy import log10 as np_log10
im_1 = Image(fname_1)
im_2 = Image(fname_2)
q1 = im_1.hdr.get_qform()
q2 = im_2.hdr.get_qform()
dec = int(np_abs(round(np_log10(min(np_abs(q1[nonzero(q1)]))))) + 1)
dec = 4 if dec > 4 else dec
return all(around(q1, dec) == around(q2, dec))