erdogant / pca

pca: A Python Package for Principal Component Analysis.
https://erdogant.github.io/pca
MIT License
284 stars 42 forks source link

Error when creating biplot because of numpy data type mismatch #58

Open fahminlb33 opened 1 month ago

fahminlb33 commented 1 month ago

When I run the biplot function it raises an error when creating the label.

This happens in this line of code:

https://github.com/erdogant/pca/blob/bc14fb7954272e02600dd370f3df5130219bc552/pca/pca.py#L1512C9-L1512C76

To resolve this issue, I slightly changed the string format to this:

label = f"{getfeat} ({topfeat['loading'].iloc[i]:.3g})"

I can create a PR for this fix.