def analyze(self):
self.neighborgrid()
# just looking at up and left to avoid needless doubel calculations
slopes=np.concatenate((np.abs(self.left - self.center),np.abs(self.up - self.center)))
return '\n'.join(["%-15s: %.3f"%t for t in [
('height average', np.average(self.center)),
('height median', np.median(self.center)),
('height max', np.max(self.center)),
('height min', np.min(self.center)),
('height std', np.std(self.center)),
('slope average', np.average(slopes)),
('slope median', np.median(slopes)),
('slope max', np.max(slopes)),
('slope min', np.min(slopes)),
('slope std', np.std(slopes))
]]
)
评论列表
文章目录