-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
deprecated int method fails for non-concrete arrays of strings #12847
Comments
mbauman
changed the title
unable to convert integer regular expression captures values to an array of integers in Julia 0.4
deprecated int method fails for non-concrete arrays of strings
Aug 28, 2015
The deprecated isue is wrong though. |
Thanks! More specifically: # Julia-0.3
julia> int(Any["1","2"])
2-element Array{Int64,1}:
1
2
# Julia-0.4
julia> int(Any["1","2"])
WARNING: int(x::AbstractArray) is deprecated, use round(Int64,x) instead.
in depwarn at /Users/mbauman/Applications/julia-0.4/lib/julia/sys.dylib
in int at deprecated.jl:49
while loading no file, in expression starting on line 0
ERROR: MethodError: `round` has no method matching round(::Type{Int64}, ::ASCIIString)
Closest candidates are:
round{T<:Integer}(::Type{T<:Integer}, ::Integer)
round{T<:Integer}(::Type{T<:Integer}, ::Float16)
round{T<:Union{Signed,Unsigned}}(::Type{T<:Union{Signed,Unsigned}}, ::Base.MPFR.BigFloat)
...
in round at floatfuncs.jl:72
in int at deprecated.jl:51 |
backported in #13107 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I asked a question like the following on stackoverflow and Matt B asked me to report this as an issue, stating "The deprecated method should work and the warning message should print a valid suggestion"
I'm unable to convert integer regular expression captures values to an array of integers in Julia 0.4.
In Julia 0.3 I could do this with int(), basically like:
But in Julia 0.4, this works for regular strings:
but doesn't work with substrings (i.e. regex captures):
which produces:
The type of the capture array is:
and I'm not able to execute int(c[3:4]) on a subset of that beastie.
The text was updated successfully, but these errors were encountered: