numpy-100 icon indicating copy to clipboard operation
numpy-100 copied to clipboard

Alternative solution for question 4

Open daviddoji opened this issue 3 years ago • 1 comments

One could use simply nbytes to get an alternative solution to question 4.

>>> Z = np.zeros((10,10))
>>> print(f"{Z.nbytes} bytes")
800 bytes

daviddoji avatar Aug 04 '21 07:08 daviddoji

You're right. Can you make a PR (maybe just adding s second argument in the print with the nbytes). I want to keep itemsize and size such that people can see these attributes exist.

rougier avatar Aug 19 '21 08:08 rougier