def tmax(a, upperlimit=None, axis=0, inclusive=True, nan_policy='propagate'):
 (a, axis) = _chk_asarray(a, axis)
 am = _mask_to_limits(a, (None, upperlimit), (False, inclusive))
 (contains_nan, nan_policy) = _contains_nan(am, nan_policy)
 if (contains_nan and (nan_policy == 'omit')):
  am = ma.masked_invalid(am)
 res = ma.maximum.reduce(am, axis).data
 if (res.ndim == 0):
  return res[()]
 return res

def tmax ( a , upperlimit = None , axis = 0 , inclusive = True , nan_policy = 'propagate' ) : ( a , axis ) = _chk_asarray ( a , axis ) am = _mask_to_limits ( a , ( None , upperlimit ) , ( False , inclusive ) ) ( contains_nan , nan_policy ) = _contains_nan ( am , nan_policy ) if ( contains_nan and ( nan_policy == 'omit' ) ) : am = ma . masked_invalid ( am ) res = ma . maximum . reduce ( am , axis ) . data if ( res . ndim == 0 ) : return res [ ( ) ] return res
compute the trimmed maximum this function computes the maximum value of an array along a given axis .