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)
def view_names(self, *names, **rename_map): # See Note [names_ / view_names API] return _update_names(self, names, rename_map, inplace=False)