0

I am getting the error "MemoryError: Unable to allocate 21.7 GiB for an array with shape (53940, 53940) and data type float64" when I am performing the below function.

def precisision(col):
    fp=col.sum(axis=0)-np.diag(col)
    tp=np.diag(col)
    presision=tp/(tp+fp)
    print (presision)
ad=precisision(df["depth"])

Diamonds dataset data set:-https://github.com/siddheshkadam21/Data-Extraction-one/raw/main/diamonds-m.csv

  • https://stackoverflow.com/questions/64964570/memoryerror-unable-to-allocate-8-27-gib-for-an-array-with-shape-323313-3435/64966122#64966122 –  Jan 14 '21 at 17:19
  • Does this answer your question? [Unable to allocate array with shape and data type](https://stackoverflow.com/questions/57507832/unable-to-allocate-array-with-shape-and-data-type) – Ulrich Eckhardt Jan 14 '21 at 17:20
  • 1
    Please search for the error message online before asking a very similar question as others that have been answered before! As a new user here, please also take the [tour] and read [ask]. Welcome! – Ulrich Eckhardt Jan 14 '21 at 17:22

0 Answers0