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

All Samples(16)  |  Call(12)  |  Derive(0)  |  Import(4)

src/p/a/parakeet-0.23.2/parakeet/transforms/simplify.py   parakeet(Download)
                       OuterMap, Map, Reduce, Scan, IndexMap, IndexReduce, 
                       IndexScan, FilterReduce)
from .. syntax.helpers import (collect_constants, is_one, is_zero, is_false, is_true, all_constants,
                               get_types, 
                               slice_none_t, const_int, one, none, true, false, slice_none, 
  def transform_Select(self, expr):
    cond = self.transform_expr(expr.cond)
    trueval = self.transform_expr(expr.true_value)
    falseval = self.transform_expr(expr.false_value)
    if is_true(cond):
        if is_false(x):
          return true 
        elif is_true(x):
          return false 
    if len(args) == 2:
          return self.cast(self.mul(x, x, "sqr"), expr.type)
      elif prim == prims.logical_and:
        if is_true(x):
          return y
        elif is_true(y):

src/p/a/parakeet-HEAD/parakeet/transforms/simplify.py   parakeet(Download)
                       OuterMap, Map, Reduce, Scan, IndexMap, IndexReduce, 
                       IndexScan, FilterReduce)
from .. syntax.helpers import (collect_constants, is_one, is_zero, is_false, is_true, all_constants,
                               get_types, 
                               slice_none_t, const_int, one, none, true, false, slice_none, 
  def transform_Select(self, expr):
    cond = self.transform_expr(expr.cond)
    trueval = self.transform_expr(expr.true_value)
    falseval = self.transform_expr(expr.false_value)
    if is_true(cond):
        if is_false(x):
          return true 
        elif is_true(x):
          return false 
    if len(args) == 2:
            return expr
      elif prim == prims.logical_and:
        if is_true(x):
          return y
        elif is_true(y):

src/p/a/parakeet-0.23.2/parakeet/transforms/simplify_array_operators.py   parakeet(Download)
from ..ndtypes import ArrayT 
from ..syntax import Var, ArrayExpr, Adverb, Range, Const, IndexMap 
from ..syntax.helpers import is_zero, is_one, is_false, is_true, is_none
from transform import Transform
 

src/p/a/parakeet-HEAD/parakeet/transforms/simplify_array_operators.py   parakeet(Download)
from ..ndtypes import ArrayT 
from ..syntax import Var, ArrayExpr, Adverb, Range, Const, IndexMap 
from ..syntax.helpers import is_zero, is_one, is_false, is_true, is_none
from transform import Transform