The volume of your 3D numpy array equals to the amount of non-zero
elements times the volume a pixels takes.
To get the amount of non-zero elements in a numpy array.
import numpy as np
units = np.count_nonzero([[[ 0., 0.],
[ 2., 0.],
[ 0., 3.]],
[[ 0., 0.],
[ 0., 5.],
[ 7., 0.]]])
# will output 4
If you know the spacing s between two pixels the volume of a pixel is calculated as the volume of a square (pixel volume) times the amount of pixels you previously determined.
volume = units * pow(s, 3)
Update:
As your spacings (s1, s2, s3) are not equidistant in your 3 dimensions, the volume will change to
volume = units * s1 * s2 * s3
# volume = 4 * 0.7609 * 0.7609 * 0.5132