def __init__(self, leaf_shape, bounds, dtype, populator=None):
self.leaf_shape = np.asarray(leaf_shape).astype(np.int64)
self.bounds = (np.asarray(bounds[0], dtype=np.int64),
np.asarray(bounds[1], dtype=np.int64))
self.dtype = np.dtype(dtype)
self.populator = populator
ceil_bounds = self.leaf_shape * \
np.exp2(np.ceil(np.log2((self.bounds[1] - self.bounds[0]) /
self.leaf_shape.astype(np.float64)))).astype(np.int64).max()
self.root_node = BranchNode(self, (self.bounds[0], self.bounds[0] + ceil_bounds), clip_bound=self.bounds[1])
评论列表
文章目录