当前位置: 首页>>代码示例>>Python>>正文


Python Transform.__init__方法代码示例

本文整理汇总了Python中transform.Transform.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Transform.__init__方法的具体用法?Python Transform.__init__怎么用?Python Transform.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在transform.Transform的用法示例。


在下文中一共展示了Transform.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
 def __init__(self, parent_transform = None, 
               rename = False, 
               recursive = False):
   Transform.__init__(self)
   self.rename = rename 
   self.recursive = recursive
   self.parent_transform = parent_transform 
开发者ID:Tillsten,项目名称:parakeet,代码行数:9,代码来源:clone_function.py

示例2: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
 def __init__(self, pi_creature, *args, **kwargs):
     blinked = deepcopy(pi_creature).blink()
     Transform.__init__(
         self, pi_creature, blinked,
         alpha_func = squish_alpha_func(there_and_back),
         *args, **kwargs
     )
开发者ID:nachinius,项目名称:animations,代码行数:9,代码来源:simple_animations.py

示例3: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
  def __init__(self):
    Transform.__init__(self)
    self.adverbs_visited = []
    self.adverb_args = []
    self.expansions = {}
    self.exp_stack = []
    self.type_env_stack = []
    self.dl_tile_estimates = []
    self.ml_tile_estimates = []

    # For now, we'll assume that no closure variables have the same name.
    self.closure_vars = {}

    self.num_tiles = 0
开发者ID:Tillsten,项目名称:parakeet,代码行数:16,代码来源:tile_adverbs.py

示例4: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
  def __init__(self,
               nesting_idx = -1,
               fixed_idx = -1,
               tile_sizes_param = None,
               fixed_tile_sizes = None,
               preallocate_output = False):
    Transform.__init__(self)
    self.nesting_idx = nesting_idx
    self.fixed_idx = fixed_idx
    self.tiling = False
    self.tile_sizes_param = tile_sizes_param
    self.fixed_tile_sizes = fixed_tile_sizes
    self.output_var = None
    self.preallocate_output = preallocate_output

    # For now, we'll assume that no closure variables have the same name.
    self.closure_vars = {}
开发者ID:lucciano,项目名称:parakeet,代码行数:19,代码来源:lower_tiled_adverbs.py

示例5: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
    def __init__(self, start_anim, end_anim, **kwargs):
        digest_config(self, kwargs, locals())
        if "run_time" in kwargs:
            self.run_time = kwargs.pop("run_time")
        else:
            self.run_time = max(start_anim.run_time, end_anim.run_time)
        for anim in start_anim, end_anim:
            anim.set_run_time(self.run_time)
            
        if start_anim.starting_mobject.get_num_points() != end_anim.starting_mobject.get_num_points():
            Mobject.align_data(start_anim.starting_mobject, end_anim.starting_mobject)
            for anim in start_anim, end_anim:
                if hasattr(anim, "ending_mobject"):
                    Mobject.align_data(anim.starting_mobject, anim.ending_mobject)

        Transform.__init__(self, start_anim.mobject, end_anim.mobject, **kwargs)
        #Rewire starting and ending mobjects
        start_anim.mobject = self.starting_mobject
        end_anim.mobject = self.ending_mobject
开发者ID:mherkazandjian,项目名称:manim,代码行数:21,代码来源:meta_animations.py

示例6: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
 def __init__(self, tenv, var_map):
   Transform.__init__(self)
   self.type_env = tenv 
   self.var_map = var_map
开发者ID:cournape,项目名称:parakeet,代码行数:6,代码来源:type_inference.py

示例7: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
 def __init__(self, mobject, **kwargs):
     mobject.sort_points(np.linalg.norm)
     mob_copy = mobject.copy()
     mob_copy.sort_points(lambda p : -np.linalg.norm(p))
     Transform.__init__(self, mobject, mob_copy, **kwargs)
开发者ID:Rubixdarcy,项目名称:manim,代码行数:7,代码来源:playground.py

示例8: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
 def __init__(self, rename = False, recursive = False):
   Transform.__init__(self)
   self.rename = rename 
   self.recursive = recursive
开发者ID:cournape,项目名称:parakeet,代码行数:6,代码来源:clone_function.py

示例9: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
 def __init__(self):
   Transform.__init__(self)
开发者ID:rjpower,项目名称:parakeet,代码行数:4,代码来源:parallelize_loops.py

示例10: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
 def __init__(self, mat):
     Transform.__init__(self, mat)
     self.total_doc = len(self.mat)
开发者ID:laloxxx20,项目名称:FinalParalelos,代码行数:5,代码来源:tfidf.py

示例11: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
    def __init__(self, degree):

    	Transform.__init__(self)
    	degree = math.radians(degree)
        self.trans_matrix = [[math.cos(degree), math.sin(degree)*-1.0, 0], [math.sin(degree), math.cos(degree), 0], [0, 0, 1]]
        print self.trans_matrix
开发者ID:germanogesser,项目名称:computacao_grafica,代码行数:8,代码来源:rotation.py

示例12: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
 def __init__(self, return_type = None):
   Transform.__init__(self, verify = False)
   self.forced_return_type = return_type 
开发者ID:cournape,项目名称:parakeet,代码行数:5,代码来源:rewrite_typed.py

示例13: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
 def __init__(self, rename_dict):
   Transform.__init__(self, require_types = False)
   self.rename_dict = rename_dict
开发者ID:cournape,项目名称:parakeet,代码行数:5,代码来源:subst.py

示例14: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
 def __init__(self, transform_to_apply = None):
   Transform.__init__(self)
   self.transform = transform_to_apply
   self.cache.push()
开发者ID:waytai,项目名称:parakeet,代码行数:6,代码来源:recursive_apply.py

示例15: __init__

# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
 def __init__(self, outer_type_env):
   Transform.__init__(self)
   self.recursive = False
   self.type_env = outer_type_env
   self.rename_dict = {}
开发者ID:cournape,项目名称:parakeet,代码行数:7,代码来源:clone_stmt.py


注:本文中的transform.Transform.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。