File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -180,21 +180,25 @@ def inner(f, g):
180180 return f .dtype (n .data [0 ])
181181
182182
183+ red_doc = lambda func : f"""
184+ Retrieve the { func } imum.
185+
186+ Parameters
187+ ----------
188+ f : array_like or Function
189+ Input operand.
190+ """
191+
192+
183193mmin = lambda f : _reduce_func (f , np .min , dv .mpi .MPI .MIN )
194+ mmin .__doc__ = red_doc ('min' )
184195mmax = lambda f : _reduce_func (f , np .max , dv .mpi .MPI .MAX )
196+ mmax .__doc__ = red_doc ('max' )
185197
186198
187199@dv .switchconfig (log_level = 'ERROR' )
188200@check_builtins_args
189201def _reduce_func (f , func , mfunc ):
190- """
191- Retrieve the maximum.
192-
193- Parameters
194- ----------
195- f : array_like or Function
196- Input operand.
197- """
198202 if isinstance (f , dv .Constant ):
199203 return f .data
200204 elif isinstance (f , dv .types .dense .DiscreteFunction ):
You can’t perform that action at this time.
0 commit comments