class_docstr: Partition generator using the Chinese Restaurant Process (CRP).
  
  The first element creates the first partition. The n-th element chooses to
  either create a new partition with probability `alpha / (n - 1 + alpha)`, or
  join an existing partition `B_k` with probabiliy `|B_k|/(n - 1 + alpha)` where
  `|B_k|` is the size of `B_k`.
  
  Attributes:
    alpha: A positive float representing the discount parameter of CRP.
docstr: Generates partitions for `n` elements.
  
  Arguments:
    n: The number of data points.
  
  Returns:
    A 1-D `np.ndarray` in which each element is the size of a partition.
docstr_tok: ["Generates","partitions","for","`","n","`","elements",".","Arguments",":","n",":","The","number","of","data","points",".","Returns",":","A","1-D","`","np.ndarray","`","in","which","each","element","is","the","size","of","a","partition","."]
code: def generate_single(self, n: int) -> np.ndarray:
      """Generates partitions for `n` elements.
  
      Arguments:
        n: The number of data points.
  
      Returns:
        A 1-D `np.ndarray` in which each element is the size of a partition.
      """
      return self.generate_batch(n, 1)[0]
  
imports: from typing import List
  import numpy
label_desc: Use image node_id 3 for calling the CRPGenerator obj's underlying member method code with example usage: obj.generate_single(n) and returns: self