rougier/numpy-100

Alternative solution for question 4

daviddoji opened this issue · 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

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.