Spatial averaging over the domain


I’m trying to find the domain-wide spatial average of a scalar quantity q. I’m working with a non-uniform grid. The python calculator has a mean option. However, it is stated that it returns the average of the array’s contents. Will it take into account the mesh’s non-uniformity in averaging?. The mean option in the python calculator is giving nothing and saying the data range is too small to render. Can anyone recommend a method for performing overall spatial averaging of a scalar quantity with data on a non-uniform mesh?

Thanks in advance.