def run(self):
# pr = cProfile.Profile()
print '[LOG]: start new thread '+str(self.threadID)
curTime = time.time()
distM = self.matrix[self.sfrom].dot(
self.matrix[self.sto].T).todense()
distM = np.maximum(
np.arccos(np.minimum(distM, np.ones(distM.shape))) /
(PI_VALUE/200)-0.01,
np.zeros(distM.shape)).astype(np.int8)
# np.savetxt(self.fo, distM, fmt = '%d')
np.save(self.fo + '.npy', distM)
print('[LOG]: thread %d finished after %d' %
(self.threadID, time.time() - curTime))
# self.pr.disable()
# # sortby = 'cumulative'
# # pstats.Stats(pr).strip_dirs().sort_stats(sortby).print_stats()
# self.pr.print_stats()
calculateDistanceInt.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录