Open beew opened 1 year ago
I think it is because of this that plot doesn't work.
Thank you @beew. I'm looking into the CI to see if I can reproduce there. Meanwhile, besides unit tests issues, could you clarify what you mean by
plot doesn't work
? Namely, could you provide another code example that seems to fail?
Hi,
I just tried the code from https://giotto-ai.github.io/gtda-docs/0.5.1/notebooks/plotting_api.html to test the installation.
and also this one
import sys
sys.path.append("/home/beew/opt/python310/giotto-tda/examples/data")
from generate_datasets import make_point_clouds
n_samples_per_class = 10
point_clouds, labels = make_point_clouds(n_samples_per_class, 10, 0.1)
point_clouds.shape
print(f"There are {point_clouds.shape[0]} point clouds in {point_clouds.shape[2]} dimensions, "
f"each with {point_clouds.shape[1]} points.")
from gtda.homology import VietorisRipsPersistence
VR = VietorisRipsPersistence(homology_dimensions=[0, 1, 2]) # Parameter explained in the text
diagrams = VR.fit_transform(point_clouds)
diagrams.shape
from gtda.plotting import plot_diagram
i = 0
plot_diagram(diagrams[i])
No plot shows up.
Any update?
Actually the code above does produce plot in jupyter notebook, I was running it in spyder.
dear @beew ,
I also noticed those tests failing and I could not figure out the cause. They are deactivated for now: if you ahve any idea on how to fix the issue, we would happily review your PR!
Running pytest gtda produces two failed tests.
More detailed outputs
import platform; print(platform.platform()) Linux-5.15.0-60-generic-x86_64-with-glibc2.35
import sys; print("Python", sys.version) Python 3.10.9 (main, Feb 7 2023, 22:43:20) [GCC 11.3.0]
import numpy; print("NumPy", numpy.version) NumPy 1.23.5
import scipy; print("SciPy", scipy.version) SciPy 1.10.0
import joblib; print("Joblib", joblib.version) Joblib 1.2.0
import sklearn; print("Scikit-learn", sklearn.version) Scikit-learn 1.2.1
import gtda; print("Giotto-tda", gtda.version) Giotto-tda 0.6.0