示例#1
0
文件: test_rdf.py 项目: caspervdw/rdf
 def test_fluct_hist(self):
     std = []
     for bw in [0.1, 0.2, 1, 2, 5]:
         _, hist = rdf_hist(self.pos, self.mode, self.min_dist,
                            self.max_dist, bw, **self.kwargs)
         std.append(hist.std())
     assert np.all(std[1:] < std[:-1])
示例#2
0
文件: test_rdf.py 项目: caspervdw/rdf
 def test_flat_kde(self):
     _, hist = rdf_hist(self.pos, self.mode, self.min_dist,
                        self.max_dist, self.bw, **self.kwargs)
     assert_array_almost_equal(hist[2:-2], 1, 1)  # 1.0 up to 1 decimal