changed from np.mean to txtarray.mean