本文整理汇总了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
示例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
)
示例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
示例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 = {}
示例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
示例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
示例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)
示例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
示例9: __init__
# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import __init__ [as 别名]
def __init__(self):
Transform.__init__(self)
示例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)
示例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
示例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
示例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
示例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()
示例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 = {}