내 코드는 .tiff 이미지에서 후자를 계산합니다.NumPy 배열 요소를 인쇄 할 때 지수 (과학 표기)를 제거하는 방법은 무엇입니까?
2.84737313535e-05
1.25610416364e-09
1.25419253619e-09
1.57419718046e-18
6.69242940524e-12
: 나는처럼 보이는, 출력에 지수 (과학) 표기법을 제거해야 4.17512050223e-22
def humoments(self): #function for HuMoments computation
for filename in glob.iglob ('*.tif'):
img = cv.LoadImageM(filename, cv.CV_LOAD_IMAGE_GRAYSCALE)
cancer = cv.GetHuMoments(cv.Moments(img))
#arr = cancer
arr = numpy.array([cancer])
with open('hu.csv', 'wb') as csvfile:
for elem in arr.flat[:50]:
#print('{}\t'.format(elem)) #this code puts the result to console
writer = csv.writer(csvfile, delimiter=' ', quotechar='|', quoting=csv.QUOTE_MINIMAL)
writer.writerow([('{}\t'.format(elem))])
나에게