Return the minor loss coefficient of the drain pipe.
        :returns: Minor Loss Coefficient
        :return: float
967165
def drain_K(self):
        
        drain_K = minorloss.PIPE_ENTRANCE_K_MINOR + minorloss.PIPE_ENTRANCE_K_MINOR + minorloss.PIPE_EXIT_K_MINOR
        return drain_K
1236915
def money_flow(close_data, high_data, low_data, volume):
    
    catch_errors.check_for_input_len_diff(
        close_data, high_data, low_data, volume
        )
    mf = volume * tp(close_data, high_data, low_data)
    return mf
508772
def sg_regularizer_loss(scale=1.0):
    
    """
    return scale * tf.reduce_mean(tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES))
728286
def _get_config_float(self, section: str, key: str, fallback: float=object()) -> float:
        
        return self._config.getfloat(section, key, fallback=fallback)
293633
def _huber_loss(x, delta=1.0):
    """"""
    return tf.where(
        tf.abs(x) < delta,
        tf.square(x) * 0.5, delta * (tf.abs(x) - 0.5 * delta))
451989
def _k_value_square_reduction(ent_pipe_id, exit_pipe_id, re, f):
    

    if re < 2500:
        return (1.2 + (160 / re)) * ((ent_pipe_id / exit_pipe_id) ** 4)
    else:
        return (0.6 + 0.48 * f) * (ent_pipe_id / exit_pipe_id) ** 2\
            * ((ent_pipe_id / exit_pipe_id) ** 2 - 1)
1134753
def value(self):
        
        load_average_range = self.max_load_average - self.min_load_average
        return (self.load_average - self.min_load_average) / load_average_range
702630
def value(self):
        
        if self.normalized:
            conf = self.conf.astype(np.float32)
            return conf / conf.sum(1).clip(min=1e-12)[:, None]
        else:
            return self.conf
311885
def flow_pipemajor(Diam, HeadLossFric, Length, Nu, PipeRough):
    
    #Inputs do not need to be checked here because they are checked by
    #functions this function calls.
    FlowHagen = flow_hagen(Diam, HeadLossFric, Length, Nu).magnitude
    if FlowHagen < flow_transition(Diam, Nu).magnitude:
        return FlowHagen
    else:
        return flow_swamee(Diam, HeadLossFric, Length, Nu, PipeRough).magnitude
546269
def value(self):
        
        if self.buffer:
            return np.mean([ep['l'] for ep in self.buffer])
        else:
            return 0
378416
def get_regularization_penalty(self) -> Union[float, torch.Tensor]:
        
        if self._regularizer is None:
            return 0.0
        else:
            return self._regularizer(self)
1202951
def scalloping_loss(wnd):
  
  return -dB20(abs(sum(wnd * cexp(line(len(wnd), 0, -1j * pi)))) / sum(wnd))
89595
def get_monitor_value(self):
        ""
        if self.monitor=='trn_loss' and len(self.learn.recorder.losses) == 0: return None
        elif len(self.learn.recorder.val_losses) == 0: return None
        values = {'train_loss':self.learn.recorder.losses[-1].cpu().numpy(),
                  'valid_loss':self.learn.recorder.val_losses[-1]}
        if values['valid_loss'] is None: return
        if self.learn.recorder.metrics:
            for m, n in zip(self.learn.recorder.metrics[-1],self.learn.recorder.names[3:-1]):
                values[n] = m
        if values.get(self.monitor) is None:
            warn(f'{self.__class__} conditioned on metric `{self.monitor}` which is not available. Available metrics are: {", ".join(map(str, self.learn.recorder.names[1:-1]))}')
        return values.get(self.monitor)
1129318
def std(self) -> Optional[float]:  #, ddof=0):
        
        # TODO: Add DOF
        if self._stats:
            return np.sqrt(self.variance())
        else:
            return None
548161
def value(self, loss_type, time_event=None):
        
        if loss_type == 'occupants':
            return self.values['occupants_' + str(time_event)]
        try:  # extract from the cache
            val = self._cost[loss_type]
        except KeyError:  # compute
            val = self.calc(loss_type, self.values, self.area, self.number)
            self._cost[loss_type] = val
        return val
1089350
def min(self, key=None):
        
        if key is None:
            return self.reduce(min)
        return self.reduce(lambda a, b: min(a, b, key=key))
627342
def value(self):
        
        if self.buffer:
            return np.quantile(self.buffer, self.quantile)
        else:
            return 0.0