Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(3)  |  Derive(1)  |  Import(5)

src/f/u/FuncDesigner-0.5307/FuncDesigner/logic.py   FuncDesigner(Download)
def AND(*args):
    from BooleanOOFun import BooleanOOFun
    Args = args[0] if len(args) == 1 and isinstance(args[0], (ndarray, tuple, list, set)) else args
    assert not isinstance(args[0], ndarray), 'unimplemented yet' 
    Args2 = []
 
    f  = logical_and if len(Args2) == 2 else alt_AND_engine
    r = BooleanOOFun(f, Args2, vectorized = True)
    r.nlh = lambda *arguments: nlh_and(Args2, r._getDep(), *arguments)
    r.oofun = r
def XOR(*args):
    from BooleanOOFun import BooleanOOFun
    Args = args[0] if len(args) == 1 and isinstance(args[0], (ndarray, tuple, list, set)) else args
    assert not isinstance(args[0], ndarray), 'unimplemented yet' 
    for arg in Args:
        if not isinstance(arg, OOFun):
            raise FuncDesignerException('FuncDesigner logical XOR currently is implemented for oofun instances only')    
    #f = lambda *args: logical_xor(hstack([asarray(elem).reshape(-1, 1) for elem in args]))
    r = BooleanOOFun(f_xor, Args, vectorized = True)
    elif _bool_oofun is True:
        return False
    from BooleanOOFun import BooleanOOFun
    assert not isinstance(_bool_oofun, (ndarray, list, tuple, set)), 'disjunctive and other logical constraint are not implemented for ooarrays/ndarrays/lists/tuples yet' 
    if not isinstance(_bool_oofun, OOFun):

src/f/u/FuncDesigner-0.5307/FuncDesigner/constraints.py   FuncDesigner(Download)
from ooFun import oofun
from BooleanOOFun import BooleanOOFun
from FDmisc import FuncDesignerException
from ooPoint import ooPoint
from numpy import atleast_1d, isnan, logical_and, inf, asfarray, tile, vstack, prod, int8, int16, int32, int64, \
isinf, logical_or, logical_not, isfinite, log2, any
 
class BaseFDConstraint(BooleanOOFun):

src/f/u/FuncDesigner-0.5307/FuncDesigner/ooVar.py   FuncDesigner(Download)
from ooFun import oofun
from logic import AND, OR, NOT, EQUIVALENT
from BooleanOOFun import BooleanOOFun
#from FuncDesigner import IMPLICATION
from ooarray import ooarray