File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -378,8 +378,8 @@ def conj(x: Array, /) -> Array:
378
378
379
379
See its docstring for more information.
380
380
"""
381
- if x .dtype not in _complex_floating_dtypes :
382
- raise TypeError ("Only complex floating-point dtypes are allowed in conj" )
381
+ if x .dtype not in _numeric_dtypes :
382
+ raise TypeError ("Only numeric dtypes are allowed in conj" )
383
383
return Array ._new (np .conj (x ._array ), device = x .device )
384
384
385
385
@@ -568,8 +568,8 @@ def real(x: Array, /) -> Array:
568
568
569
569
See its docstring for more information.
570
570
"""
571
- if x .dtype not in _complex_floating_dtypes :
572
- raise TypeError ("Only complex floating-point dtypes are allowed in real" )
571
+ if x .dtype not in _numeric_dtypes :
572
+ raise TypeError ("Only numeric dtypes are allowed in real" )
573
573
return Array ._new (np .real (x ._array ), device = x .device )
574
574
575
575
You can’t perform that action at this time.
0 commit comments