Skip to content

Parse Inf as float#171

Open
pearlzli wants to merge 1 commit intoqueryverse:masterfrom
pearlzli:pzl/inf
Open

Parse Inf as float#171
pearlzli wants to merge 1 commit intoqueryverse:masterfrom
pearlzli:pzl/inf

Conversation

@pearlzli
Copy link
Copy Markdown

@pearlzli pearlzli commented Apr 7, 2022

I added this because I wrote a table containing Infs using CSVFiles but wasn't able to read it back in using the same.

julia> import TextParse: fromtype, tryparsenext, unwrap

julia> tryparsenext(fromtype(Float64), "Inf", 1, 3) |> unwrap
(Inf, 4)

julia> tryparsenext(fromtype(Float64), "inf", 1, 3) |> unwrap
(Inf, 4)

julia> tryparsenext(fromtype(Float64), "INF", 1, 3) |> unwrap
(Inf, 4)

julia> tryparsenext(fromtype(Float64), "-Inf", 1, 4) |> unwrap
(Inf, 5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant