remove contiguous on full (#1212)

This commit is contained in:
George Hotz
2023-07-09 17:31:15 -07:00
committed by GitHub
parent 13a1abf9e7
commit 43385c7dbf
2 changed files with 3 additions and 2 deletions

View File

@@ -143,7 +143,7 @@ class Tensor:
# ***** creation helper functions *****
@staticmethod
def full(shape:Tuple[int, ...], fill_value, **kwargs): return Tensor(fill_value, **kwargs).reshape([1]*len(new_shape := argfix(shape))).expand(new_shape).contiguous()
def full(shape:Tuple[int, ...], fill_value, **kwargs): return Tensor(fill_value, **kwargs).reshape([1]*len(new_shape := argfix(shape))).expand(new_shape)
@staticmethod
def zeros(*shape, **kwargs): return Tensor.full(argfix(*shape), 0, **kwargs)