<div dir="ltr"><div>How far in your code do you reach? That will help narrowing down the problem.<br><br></div>Also, do you have the core dump? Can you run gdb on it?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 October 2017 at 15:34, Sema Atasever <span dir="ltr"><<a href="mailto:s.atasever@gmail.com" target="_blank">s.atasever@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear scipy-users:<div><br></div><div>I am trying to write a python program which uses SciPy library that makes hierarchical clustering.<br></div><div><br></div><div>After I type in my input at the "shell> " prompt:  <b>python SciPy_clustering.py </b><br></div><div><br></div><div>gives me the following error:</div><div><br></div><div><b>Segmentation fault (core dumped)</b><br></div><div><br></div><div>How can i fix this problem?</div><div><br></div><div>There is enough memory on my system (516 GB), python code uses just 21GB memory.</div><div><br></div><div>My dataset includes 73.622 data samples (rows)  and 22 features (columns). When i shrink dataset (31.000) it works fine correctly.</div><div><br></div><div>Thanks in Advance.</div><div><br></div><div><b>python Clustering Code:</b></div><div><div># needed imports</div><div>import numpy as np</div><div>import time</div><div>from matplotlib import pyplot as plt</div><div>from scipy.cluster.hierarchy import dendrogram, linkage</div><div>from scipy.cluster.hierarchy import cophenet</div><div>from scipy.spatial.distance import pdist</div><div><br></div><div>start_time = time.clock()</div><div><br></div><div>X=np.loadtxt(open("dataset.<wbr>txt", "rb"), delimiter=";")</div><div><br></div><div>print ('\nX.shape')</div><div>print (X.shape)</div><div><br></div><div># generate the linkage matrix</div><div>Z = linkage(X, 'single')</div><div><br></div><div>np.savetxt('Z_output.txt', Z, fmt='%-7.5f')</div><div><br></div><div>c, coph_dists = cophenet(Z, pdist(X))</div><div><br></div><div>print("Cophenetic Correlation Coefficient : \n")</div><div>print(c)</div><div><br></div><div>print("\nRunning Time:")</div><div>print (time.clock() - start_time, "seconds")</div></div><div> </div></div>
<br>______________________________<wbr>_________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@python.org">SciPy-User@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scipy-user</a><br>
<br></blockquote></div><br></div>