Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This gives a much more accurate estimate when we are dealing with many small arrays that are merged into one. For example: For 6 elements array the overhead of sys.getsizeof gives a size increase with a factor of 6 In [2]: import numpy as np In [3]: d = np.array([[1,2,3],[4,5,6]]) In [4]: import sys In [5]: sys.getsizeof(d) Out[5]: 152 In [6]: d.dtype.itemsize * d.size Out[6]: 24
- Loading branch information