getVal seems to work

This commit is contained in:
Robin committed 2024-12-21 14:17:39 +01:00
1 parent 4b06f289b8
commit a7ad248c38
6 files changed
+39 -50

No files matched your search

+4 -2
View File
@@ -23,11 +23,13 @@ print("Mean of U:", U_mean)
print("Sum of U:", U_sum)
sumval = 0
row = U[0,0,100]
row = U[2,20,100]
n = 0
for val in row:
if not np.ma.is_masked(val):
n+=1
sumval += val
print(f"Why does {np.sum(row)=} not equal {sumval=} ?!")
print(f"Why does {np.mean(row)=} not equal {sumval/n=} ?!")
# Close the NetCDF file
ncfile.close()
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.