hy-repr: Fix a crash when given a NumPy array
This commit is contained in:
parent
7b94c45e16
commit
eea8cf1061
@ -80,9 +80,9 @@
|
|||||||
(.rstrip (repr x) "L")
|
(.rstrip (repr x) "L")
|
||||||
(and (in t [float HyFloat]) (isnan x))
|
(and (in t [float HyFloat]) (isnan x))
|
||||||
"NaN"
|
"NaN"
|
||||||
(= x Inf)
|
(and (in t [float HyFloat]) (= x Inf))
|
||||||
"Inf"
|
"Inf"
|
||||||
(= x -Inf)
|
(and (in t [float HyFloat]) (= x -Inf))
|
||||||
"-Inf"
|
"-Inf"
|
||||||
(in t [complex HyComplex])
|
(in t [complex HyComplex])
|
||||||
(.replace (.replace (.strip (repr x) "()") "inf" "Inf") "nan" "NaN")
|
(.replace (.replace (.strip (repr x) "()") "inf" "Inf") "nan" "NaN")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user