A synonim for :meth:`PBEnc.leq`.
439041
def atmost(cls, lits, weights=None, bound=1, top_id=None,
            encoding=EncType.best):
        

        return cls.leq(lits, weights, bound, top_id, encoding)
1229789
def _se_all(self):
        """"""
        x = np.atleast_2d(self.x)
        err = np.atleast_1d(self.ms_err)
        se = np.sqrt(np.diagonal(np.linalg.inv(x.T @ x)) * err[:, None])
        return np.squeeze(se)
1292587
def find_le(a, x):
    """"""
    i = bs.bisect_right(a, x)
    if i: return i - 1
    raise ValueError
1126894
def _lbdvrpmllpmbb(self,*args,**kwargs):
        """"""
        obs, ro, vo= self._parse_radec_kwargs(kwargs,dontpop=True)
        X,Y,Z,vX,vY,vZ= self._XYZvxvyvz(*args,**kwargs)
        bad_indx= (X == 0.)*(Y == 0.)*(Z == 0.)
        if True in bad_indx:
            X[bad_indx]+= ro/10000.
        return coords.rectgal_to_sphergal(X,Y,Z,vX,vY,vZ,degree=True)
361202
def np_lst_sq(vecMdl, aryFuncChnk):
    
    aryTmpBts, vecTmpRes = np.linalg.lstsq(vecMdl,
                                           aryFuncChnk,
                                           rcond=-1)[:2]

    return aryTmpBts, vecTmpRes
825101
def getImemb(self):
        """"""
        self.imembPtr.gather(self.imembVec)
        return self.imembVec.as_numpy()
284425
def _mdens(self,m):
        """"""
        return (self.a/m)**self.alpha/(1.+m/self.a)**(self.betaminusalpha)
192901
def sequence_isoelectric_point(seq, granularity=0.1):
    
    if 'X' in seq:
        warnings.warn(_nc_warning_str, NoncanonicalWarning)
    ph_range, charge_at_ph = charge_series(seq, granularity)
    abs_charge_at_ph = [abs(ch) for ch in charge_at_ph]
    pi_index = min(enumerate(abs_charge_at_ph), key=lambda x: x[1])[0]
    return ph_range[pi_index]
76589
def index(self, pkt_num):
        """"""
        int_check(pkt_num)
        for counter, datagram in enumerate(self.datagram):
            if pkt_num in datagram.index:
                return counter
        return None
26813
def srem(self, key, member, *members):
        """"""
        return self.execute(b'SREM', key, member, *members)
1105619
def _jit_give_bond_array(pos, bond_radii, self_bonding_allowed=False):
        
        n = pos.shape[0]
        bond_array = np.empty((n, n), dtype=nb.boolean)

        for i in range(n):
            for j in range(i, n):
                D = 0
                for h in range(3):
                    D += (pos[i, h] - pos[j, h])**2
                B = (bond_radii[i] + bond_radii[j])**2
                bond_array[i, j] = (B - D) >= 0
                bond_array[j, i] = bond_array[i, j]
        if not self_bonding_allowed:
            for i in range(n):
                bond_array[i, i] = False
        return bond_array
297817
def nTimes(n, f, *args, **kwargs):
    

    """
    for i in xrange(n): f(*args, **kwargs)
1056713
def _convert_eq(self, eq):
        
        rename = dict(enumerate(self.index))
        eq['eq_sets'] = {rename[k]: {rename[x] for x in v}
                         for k, v in eq['eq_sets'].items()}
        eq['sym_ops'] = {rename[k]: {rename[x]: v[x] for x in v}
                         for k, v in eq['sym_ops'].items()}
        try:
            sym_mol = self.from_pymatgen_molecule(eq['sym_mol'])
            sym_mol.index = self.index
            eq['sym_mol'] = sym_mol._to_numeric()
        except KeyError:
            pass
1020355
def dep2req(name, imported_by):
    
    lst = [item for item in sorted(imported_by) if not item.startswith(name)]
    res = '%-15s # from: ' % name
    imps = ', '.join(lst)
    if len(imps) < WIDTH - 24:
        return res + imps
    return res + imps[:WIDTH - 24 - 3] + '...'
1043925
def acorr_lpc(x, axis=-1):
    """"""
    if not np.isrealobj(x):
        raise ValueError("Complex input not supported yet")

    maxlag = x.shape[axis]
    nfft = int(2 ** nextpow2(2 * maxlag - 1))

    if axis != -1:
        x = np.swapaxes(x, -1, axis)
    a = _acorr_last_axis(x, nfft, maxlag)
    if axis != -1:
        a = np.swapaxes(a, -1, axis)
    return a
425587
def identity_abs(aseq, bseq):
    """"""
    assert len(aseq) == len(bseq)
    return sum(a == b
               for a, b in zip(aseq, bseq)
               if not (a in '-.' and b in '-.'))
1032543
def _scalar_coef_op_left(func):
        """"""
        @wraps(func)
        def verif(self, scoef):
            if isinstance(scoef, ScalarCoefs):
                if len(self._vec) == len(scoef._vec):
                    return ScalarCoefs(func(self, self._vec, scoef._vec),
                                        self.nmax,
                                        self.mmax)
                else:
                    raise ValueError(err_msg['SC_sz_msmtch'] % \
                                    (self.nmax, self.mmax,
                                     scoef.nmax, scoef.mmax))
        
            elif isinstance(scoef, numbers.Number):
                return ScalarCoefs(func(self, self._vec, scoef), self.nmax,
                                   self.mmax)
            else:
                raise TypeError(err_msg['no_combi_SC'])
        return verif