@@ -348,6 +348,8 @@ def __rsub__(self, other):
348
348
return ops .sub (other , self )
349
349
350
350
def __eq__ (self , other ):
351
+ if other is None :
352
+ return False
351
353
return ops .eq (self , other )
352
354
353
355
def __gt__ (self , other ):
@@ -1891,7 +1893,8 @@ def repeat_interleave(self, repeats, dim=None, output_size=None):
1891
1893
return ops .repeat_interleave (self , repeats , dim , output_size = output_size )
1892
1894
1893
1895
# Tensor.reshape
1894
- def reshape (self , * shape ):
1896
+ def reshape (self , * shape , ** kwargs ):
1897
+ shape = kwargs .pop ('shape' , shape )
1895
1898
return ops .reshape (self , * shape )
1896
1899
1897
1900
# Tensor.reshape_as
@@ -1956,13 +1959,13 @@ def scatter_add(self, dim, index, src):
1956
1959
1957
1960
1958
1961
# Tensor.scatter_reduce_
1959
- def scatter_reduce_ (self , dim , index , src ):
1962
+ def scatter_reduce_ (self , dim , index , src , reduce , * , include_self = True ):
1960
1963
return self .copy_ (ops .scatter_reduce (self , dim , index , src ))
1961
1964
1962
1965
1963
1966
# Tensor.scatter_reduce
1964
- def scatter_reduce (self , dim , index , src ):
1965
- return ops .scatter_reduce (self , dim , index , src )
1967
+ def scatter_reduce (self , dim , index , src , reduce , * , include_self = True ):
1968
+ return ops .scatter_reduce (self , dim , index , src , reduce )
1966
1969
1967
1970
1968
1971
# Tensor.select
@@ -2436,7 +2439,8 @@ def unsqueeze_(self, dim):
2436
2439
2437
2440
2438
2441
# Tensor.var
2439
- def var (self , dim = None , * , correction = 1 , keepdim = False ):
2442
+ def var (self , dim = None , * , correction = 1 , keepdim = False , ** kwargs ):
2443
+ correction = int (kwargs .pop ('unbiased' , correction ))
2440
2444
return ops .var (self , dim , correction = correction , keepdim = keepdim )
2441
2445
2442
2446
# Tensor.vdot
0 commit comments