return a F ordered version of A, assuming A is symmetric
7541
def force_F_ordered_symmetric(A):
    
    if A.flags['F_CONTIGUOUS']:
        return A
    if A.flags['C_CONTIGUOUS']:
        return A.T
    else:
        return np.asfortranarray(A)
1354047
def get_ordering(self):
        """"""
        _, ordering = self.token_next_by(t=T.Keyword.Order)
        return ordering.normalized if ordering else None
499852
def symmetries(self):
        """"""

        symmetry_cycles = set([])
        symmetries = set([])
        for match in GraphSearch(EqualPattern(self))(self):
            match.cycles = match.get_closed_cycles()
            if match.cycles in symmetry_cycles:
                raise RuntimeError("Duplicates in EqualMatch")
            symmetry_cycles.add(match.cycles)
            symmetries.add(match)
        return symmetries
911517
def _orderedCleanDict(attrsObj):
    
    def _filt(k, v):
        if attr.has(v):
            return not not any(attr.astuple(v))
        return not not v

    return attr.asdict(attrsObj,
        dict_factory=OrderedDict,
        recurse=False,
        filter=_filt)
968696
def logical_or(f1, f2):  # function factory
    '''
    '''
    def f_or(arr):
        return np.logical_or(f1(arr), f2(arr))
    f_or.__name__ = f1.__name__ + "_or_" + f2.__name__
    return f_or
794332
def _(f, x):
    
    result = {}
    for k, v in x.items():
        k_, v_ = f(k, v)
        result[k_] = v_
    return result
215207
def compose(*funcs):
    """"""
    return lambda x: reduce(lambda v, f: f(v), reversed(funcs), x)
669703
function (f, d) {

        f = makeCompareFunction(f, d);
        f.thenBy = tb;
        return f;
    }
1242682
def almost_equal(f: DataFrame, g: DataFrame) -> bool:
    
    if f.empty or g.empty:
        return f.equals(g)
    else:
        # Put in canonical order
        F = (
            f.sort_index(axis=1)
            .sort_values(list(f.columns))
            .reset_index(drop=True)
        )
        G = (
            g.sort_index(axis=1)
            .sort_values(list(g.columns))
            .reset_index(drop=True)
        )
        return F.equals(G)
221786
def sorted(self, fsort):
        '''
        
        '''
        if not self.params:
            self.params = dict()
        self.params['sort'] = fsort

        return self
647256
def between_or_equal_to(y, z):
        """"""
        return _combinable(lambda x: (y <= x <= z) or _equal_or_float_equal(x, y) or _equal_or_float_equal(x, z))
616053
def _align_ast(self, a):
        

        try:
            if isinstance(a, BV):
                return self._align_bv(a)
            elif isinstance(a, Bool) and len(a.args) == 2 and a.args[1].cardinality > a.args[0].cardinality:
                return self._reverse_comparison(a)
            else:
                return a
        except ClaripyBalancerError:
            return a
539901
def ordered(self):
        """"""
        active, inactive = self.active_inactive
        order = active + inactive
        return UnitCell(self.matrix[:,order], self.active[order])
1031201
function defSortFn (a, b) {
    const a1 = `${a}`;
    const b1 = `${b}`;
    if (a1 < b1) {
        return -1;
    }
    if (a1 > b1) {
        return 1;
    }
    return 0;
}
672980
function sortFn(a, b) {
    var apct = getWeightedPercent(a);
    var bpct = getWeightedPercent(b);
    var diff = apct - bpct;

    if (diff === 0) {
      return ascending(a.id(), b.id()); // make sure sort doesn't have don't-care comparisons
    } else {
      return diff;
    }
  }
561657
def uord(c):
    """"""

    if len(c) == 2:  # pragma: no cover
        high, low = [ord(p) for p in c]
        ordinal = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000
    else:
        ordinal = ord(c)

    return ordinal
622021
def dpotrs(A, B, lower=1):
    
    A = force_F_ordered(A)
    return lapack.dpotrs(A, B, lower=lower)