title: MemoryError: Unable to allocate 21.7 GiB for an array with shape (53940, 53940) and data type float64
body: <p>I am getting the error &quot;MemoryError: Unable to allocate 21.7 GiB for an array with shape (53940, 53940) and data type float64&quot; when I am performing the below function.</p>
  <pre><code>def precisision(col):
      fp=col.sum(axis=0)-np.diag(col)
      tp=np.diag(col)
      presision=tp/(tp+fp)
      print (presision)
  ad=precisision(df[&quot;depth&quot;])
  </code></pre>
  <p>Diamonds dataset
  data set:-https://github.com/siddheshkadam21/Data-Extraction-one/raw/main/diamonds-m.csv</p>