@@ -111,10 +111,10 @@ def concatenate(
111
111
out : Optional [NDArray ] = None ,
112
112
dtype : DTypeLike = None ,
113
113
casting = "same_kind" ,
114
- ) -> OutArray :
114
+ ):
115
115
_concat_check (ar_tuple , dtype , out = out )
116
116
result = _concatenate (ar_tuple , axis = axis , out = out , dtype = dtype , casting = casting )
117
- return result , out
117
+ return result
118
118
119
119
120
120
@normalizer
@@ -163,7 +163,7 @@ def stack(
163
163
* ,
164
164
dtype : DTypeLike = None ,
165
165
casting = "same_kind" ,
166
- ) -> OutArray :
166
+ ):
167
167
_concat_check (arrays , dtype , out = out )
168
168
169
169
tensors = _concat_cast_helper (arrays , dtype = dtype , casting = casting )
@@ -173,7 +173,7 @@ def stack(
173
173
result = torch .stack (tensors , axis = axis )
174
174
except RuntimeError as e :
175
175
raise ValueError (* e .args )
176
- return result , out
176
+ return result
177
177
178
178
179
179
# ### split ###
@@ -1013,7 +1013,7 @@ def clip(
1013
1013
# one of them to be None. Follow the more lax version.
1014
1014
if min is None and max is None :
1015
1015
raise ValueError ("One of max or min must be given" )
1016
- result = torch .clamp (min , max )
1016
+ result = torch .clamp (a , min , max )
1017
1017
return result
1018
1018
1019
1019
@@ -1194,6 +1194,12 @@ def inner(a: ArrayLike, b: ArrayLike, /):
1194
1194
result = result .to (torch .bool )
1195
1195
return result
1196
1196
1197
+
1198
+ @normalizer
1199
+ def outer (a : ArrayLike , b : ArrayLike , out : Optional [NDArray ] = None ):
1200
+ return torch .outer (a , b )
1201
+
1202
+
1197
1203
# ### sort and partition ###
1198
1204
1199
1205
@@ -1371,7 +1377,7 @@ def imag(a: ArrayLike):
1371
1377
1372
1378
1373
1379
@normalizer
1374
- def round_ (a : ArrayLike , decimals = 0 , out : Optional [NDArray ] = None ) -> OutArray :
1380
+ def round_ (a : ArrayLike , decimals = 0 , out : Optional [NDArray ] = None ):
1375
1381
if a .is_floating_point ():
1376
1382
result = torch .round (a , decimals = decimals )
1377
1383
elif a .is_complex ():
@@ -1730,7 +1736,7 @@ def imag(a: ArrayLike):
1730
1736
1731
1737
1732
1738
@normalizer
1733
- def round_ (a : ArrayLike , decimals = 0 , out : Optional [NDArray ] = None ) -> OutArray :
1739
+ def round_ (a : ArrayLike , decimals = 0 , out : Optional [NDArray ] = None ):
1734
1740
if a .is_floating_point ():
1735
1741
result = torch .round (a , decimals = decimals )
1736
1742
elif a .is_complex ():
@@ -1742,7 +1748,7 @@ def round_(a: ArrayLike, decimals=0, out: Optional[NDArray] = None) -> OutArray:
1742
1748
else :
1743
1749
# RuntimeError: "round_cpu" not implemented for 'int'
1744
1750
result = a
1745
- return result , out
1751
+ return result
1746
1752
1747
1753
1748
1754
around = round_
0 commit comments