import g3read as g3 import numpy as np # Read the positions and plot them f = g3.GadgetFile("snap_000") rho = f.read_new("RHO ", 0) print(np.mean(rho[:]),np.var(rho[:]))