Ejemplo n.º 1
0
 def names_(self, *names, **rename_map):
     # Note [names_ / view_names API]
     # The Python API for these is different from the C++ API. In Python:
     # 1) tensor.view_names(*names) takes a vararglist of names
     # 2) tensor.view_names(**rename_map) takes a map of names to rename.
     # C++ is static, making it difficult to implement similar behavior.
     return _update_names(self, names, rename_map, inplace=True)
Ejemplo n.º 2
0
 def view_names(self, *names, **rename_map):
     # See Note [names_ / view_names API]
     return _update_names(self, names, rename_map, inplace=False)