Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Inf as float #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Parse Inf as float #171

wants to merge 1 commit into from

Conversation

pearlzli
Copy link

@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