def _compute_occupancy(self):
x, y = self.trans_func(self._extern, at=self._bst.bin_centers)
xmin = self.xbins[0]
xmax = self.xbins[-1]
ymin = self.ybins[0]
ymax = self.ybins[-1]
occupancy, _, _ = np.histogram2d(x, y, bins=[self.xbins, self.ybins], range=([[xmin, xmax], [ymin, ymax]]))
return occupancy
评论列表
文章目录