def __repr__(self): arr_shape = self._shape pp_keys = pp.text('shape = ') + pp.text(str(arr_shape)) pp_impl = pp.text('impl = ') + self.impl.pprint() return str(pp.group( pp.text('PRNGKeyArray:') + pp.nest(2, pp.brk() + pp_keys + pp.brk() + pp_impl)))
def pprint(self): return (pp.text(f"{self.__class__.__name__}:") + pp.nest( 2, pp.group(pp.brk() + pp.join(pp.brk( ), [pp.text(f"{k} = {v}") for k, v in self._asdict().items()]))))