做这个主要是想把一个长矢量转化为一张尽量方正的图片,用于CNN
import numpy as np
def crack(integer):
start = int(np.sqrt(integer))
factor = integer / start
while not is_integer(factor):
start += 1
factor = integer / start
return int(factor), start
def is_integer(number