You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running TSNE.fit_transform, if numbers produced during the initialization somehow turned to NaN, it will segfault the process instead of throwing a python exception.
@david-cortes I think that pca is giving t-sne func zero value (as variance is 0), so zero gets in denominator (func:X_embedded = X_embedded / np.std(X_embedded[:, 0]) * 1e-4), due to which nan values are produced causing segmentation fault.
Activity
Aaraviitkgp commentedon Nov 25, 2025
@david-cortes I think that pca is giving t-sne func zero value (as variance is 0), so zero gets in denominator (func:X_embedded = X_embedded / np.std(X_embedded[:, 0]) * 1e-4), due to which nan values are produced causing segmentation fault.
FIX Prevent segfault in TSNE with PCA init on constant data (scikit-l…
nandan2003 commentedon Nov 25, 2025
Hi @Aaraviitkgp
I've opened a PR to solve this issue regarding TSNE segfaults when numbers turn to NaN #32788.
lesteve commentedon Nov 25, 2025
@david-cortes this seems like a duplicate of #28368, right?
david-cortes commentedon Nov 25, 2025
Yes, seems to be the same underlying issue.
Fix TSNE segfault on constant data and revert unrelated formatting an…
FIX Prevent segfault in TSNE with PCA init on constant data (scikit-l…
FIX Prevent segfault in TSNE with PCA init on constant data (scikit-l…