def get_num_points(ell: Ellipsoid, factor_vec: Union[float, np.ndarray]) -> int: n_dims = ell.dimension([ell]) if n_dims == 2: return int(ell.get_n_plot_2d_points([ell]).flat[0] * factor_vec) else: return int(ell.get_n_plot_3d_points([ell]).flat[0] * factor_vec[n_dims - 2])
def ellipsoid(self, *args, **kwargs): return Ellipsoid(*args, **kwargs)
def ell_unitball(n: int): return Ellipsoid(np.eye(n))