MCPcopy Create free account
hub / github.com/DedalusProject/dedalus / global_max

Method global_max

dedalus/extras/flow_tools.py:47–53  ·  view source on GitHub ↗

Compute global max of all array data.

(self, data, empty=-np.inf)

Source from the content-addressed store, hash-verified

45 return self.reduce_scalar(local_min, MPI.MIN)
46
47 def global_max(self, data, empty=-np.inf):
48 """Compute global max of all array data."""
49 if data.size:
50 local_max = np.max(data)
51 else:
52 local_max = empty
53 return self.reduce_scalar(local_max, MPI.MAX)
54
55 def global_mean(self, data):
56 """Compute global mean of all array data."""

Callers 3

maxMethod · 0.80
volume_integralMethod · 0.80
compute_timestepMethod · 0.80

Calls 2

reduce_scalarMethod · 0.95
maxMethod · 0.80

Tested by

no test coverage detected