[SciPy-User] Segmentation fault (core dumped)
davidmenhur at gmail.com
Thu Oct 12 10:20:25 EDT 2017
How far in your code do you reach? That will help narrowing down the
Also, do you have the core dump? Can you run gdb on it?
On 12 October 2017 at 15:34, Sema Atasever <s.atasever at gmail.com> wrote:
> Dear scipy-users:
> I am trying to write a python program which uses SciPy library that makes
> hierarchical clustering.
> After I type in my input at the "shell> " prompt: *python
> SciPy_clustering.py *
> gives me the following error:
> *Segmentation fault (core dumped)*
> How can i fix this problem?
> There is enough memory on my system (516 GB), python code uses just 21GB
> My dataset includes 73.622 data samples (rows) and 22 features (columns).
> When i shrink dataset (31.000) it works fine correctly.
> Thanks in Advance.
> *python Clustering Code:*
> # needed imports
> import numpy as np
> import time
> from matplotlib import pyplot as plt
> from scipy.cluster.hierarchy import dendrogram, linkage
> from scipy.cluster.hierarchy import cophenet
> from scipy.spatial.distance import pdist
> start_time = time.clock()
> X=np.loadtxt(open("dataset.txt", "rb"), delimiter=";")
> print ('\nX.shape')
> print (X.shape)
> # generate the linkage matrix
> Z = linkage(X, 'single')
> np.savetxt('Z_output.txt', Z, fmt='%-7.5f')
> c, coph_dists = cophenet(Z, pdist(X))
> print("Cophenetic Correlation Coefficient : \n")
> print("\nRunning Time:")
> print (time.clock() - start_time, "seconds")
> SciPy-User mailing list
> SciPy-User at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User