numpy-100
numpy-100 copied to clipboard
Alternative solution for question 4
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.