mirror of
https://github.com/MartinOpat/cuda-based-raytrace.git
synced 2025-06-07 02:13:10 +02:00
getVal seems to work
This commit is contained in:
1 parent
4b06f289b8
commit
a7ad248c38
6 files changed
+39
-50
No files matched your search
+4
-2
@@ -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()
|
||||