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:
378378
379379 See its docstring for more information.
380380 """
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" )
383383 return Array ._new (np .conj (x ._array ), device = x .device )
384384
385385
@@ -568,8 +568,8 @@ def real(x: Array, /) -> Array:
568568
569569 See its docstring for more information.
570570 """
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" )
573573 return Array ._new (np .real (x ._array ), device = x .device )
574574
575575
You can’t perform that action at this time.
0 commit comments