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

Method global_min

dedalus/extras/flow_tools.py:39–45  ·  view source on GitHub ↗

Compute global min of all array data.

(self, data, empty=np.inf)

Source from the content-addressed store, hash-verified

37 return self._scalar_buffer[0]
38
39 def global_min(self, data, empty=np.inf):
40 """Compute global min of all array data."""
41 if data.size:
42 local_min = np.min(data)
43 else:
44 local_min = empty
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."""

Callers 1

minMethod · 0.80

Calls 2

reduce_scalarMethod · 0.95
minMethod · 0.80

Tested by

no test coverage detected