Support function for iat().
    Find cutting time, when gammas become negative.
11562
def _cut_time(gammas):
    """"""

    for i in range(len(gammas) - 1):

        if not ((gammas[i + 1] > 0.0) & (gammas[i + 1] < gammas[i])):
            return i

    return i
1296715
def negative_directional_index(close_data, high_data, low_data, period):
    
    catch_errors.check_for_input_len_diff(close_data, high_data, low_data)
    ndi = (100 *
           smma(negative_directional_movement(high_data, low_data), period) /
           atr(close_data, period)
           )
    return ndi
759837
def lerp(self, a, t):
        
        return self.plus(a.minus(self).times(t));
848550
def GaP_Eg_Gamma(self, **kwargs):
    '''
    
    '''
    T = kwargs.get('T', 300.)
    if T < 1e-4:
        return self.Eg_Gamma_0()
    return self.Eg_Gamma_0() + 0.1081 * (1 - 1. / tanh(164. / T))  # eV
1068501
def Iaax(mt, x, *args):
    
    return Sx(mt, x) / Dx(mt, x)
502109
def GetMinimum(self, expression, cut=None):
        
        if cut:
            self.Draw(expression, cut, "goff")
        else:
            self.Draw(expression, "", "goff")
        vals = self.GetV1()
        n = self.GetSelectedRows()
        vals = [vals[i] for i in range(min(n, 10000))]
        return min(vals)
885177
def neg(self):
        

        si = StridedInterval(bits=self.bits, stride=0, lower_bound=0, upper_bound=0).sub(self)
        si.uninitialized = self.uninitialized
        return si
211442
def cnst_A0T(self, Y0):
        
        """

        # This calculation involves non-negligible computational cost. It
        # should be possible to disable relevant diagnostic information
        # (dual residual) to avoid this cost.
        Y0f = sl.rfftn(Y0, None, self.cri.axisN)
        return sl.irfftn(sl.inner(np.conj(self.Zf), Y0f,
                                  axis=self.cri.axisK), self.cri.Nv,
                         self.cri.axisN)
1047388
def getsinIm(alat):
    

    alat = np.float64(alat)

    return 2*np.sin(np.radians(alat))/np.sqrt(4 - 3*np.cos(np.radians(alat))**2)
486570
def Kdiag(self,X,target):
        """"""
        foo = np.zeros((X.shape[0],X.shape[0]))
        self.K(X,X,foo)
        target += np.diag(foo)
575687
def i2repr(self, pkt, packed_seconds):
        """"""
        time_struct = time.gmtime(self._convert_seconds(packed_seconds))
        return time.strftime("%a %b %d %H:%M:%S %Y", time_struct)
1314999
def timeit(self, metric, func, *args, **kwargs):
        
        (res, seconds) = timeit(func, *args, **kwargs)
        self.timing(metric, seconds * 1000.0)
        return res
881734
public void elapseTime(long quantum, TimeUnit timeUnit)
    {
        Preconditions.checkArgument(quantum > 0, "Time quantum must be a positive number");
        Preconditions.checkState(!isShutdown, "Trying to elapse time after shutdown");

        elapseTime(toNanos(quantum, timeUnit), ticker);
    }
897795
def find_ge(a, x):
    """"""
    i = bs.bisect_left(a, x)
    if i != len(a): return i
    raise ValueError
965724
def find_le(self, dt):
        ''''''
        i = bisect_right(self.dates, dt)
        if i:
            return i-1
        raise LeftOutOfBound
229504
def keep_negative_mask(X, y, model_generator, method_name, num_fcounts=11):
    
    return __run_measure(measures.keep_mask, X, y, model_generator, method_name, -1, num_fcounts, __mean_pred)
1315532
def g_parameter(time_residual):
    """"""
    mean = np.mean(time_residual)
    time_residual_prime = (time_residual - np.ones(time_residual.shape) * mean)
    time_residual_prime *= time_residual_prime / (-2 * 1.5 * 1.5)
    time_residual_prime = np.exp(time_residual_prime)
    g = np.sum(time_residual_prime) / len(time_residual)
    return g