Skip to content

Commit

Permalink
fix demo flow
Browse files Browse the repository at this point in the history
  • Loading branch information
rflamary committed Oct 30, 2024
1 parent 108f9c8 commit 7f59a68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/others/plot_GMM_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@

def draw_cov(mu, C, color=None, label=None, nstd=1, alpha=0.5):
def eigsorted(cov):
if torch.is_tensor(cov):
cov = cov.detach().numpy()
vals, vecs = np.linalg.eigh(cov)
order = vals.argsort()[::-1]
order = vals.argsort()[::-1].copy()
return vals[order], vecs[:, order]

vals, vecs = eigsorted(C)
Expand Down

0 comments on commit 7f59a68

Please sign in to comment.