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

repmat accepting Int only #20112

Closed
CarloLucibello opened this issue Jan 18, 2017 · 3 comments
Closed

repmat accepting Int only #20112

CarloLucibello opened this issue Jan 18, 2017 · 3 comments

Comments

@CarloLucibello
Copy link
Contributor

julia> repmat(rand(2,2), Int32(1))
ERROR: MethodError: no method matching repmat(::Array{Float64,2}, ::Int32)
Closest candidates are:
  repmat(::Union{AbstractArray{T,1},AbstractArray{T,2}}, ::Int64) at abstractarraymath.jl:271
  repmat(::Union{AbstractArray{T,1},AbstractArray{T,2}}, ::Int64, ::Int64) at abstractarraymath.jl:271
 in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
 in macro expansion at ./REPL.jl:95 [inlined]
 in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68

Could the signature be relaxed to accept generic Integers? (I guess yes :)

@tkelman
Copy link
Contributor

tkelman commented Jan 18, 2017

near-duplicate of #17372

@CarloLucibello
Copy link
Contributor Author

CarloLucibello commented Jan 18, 2017

near-duplicate of #17372

In that case the signature of reshape was tightened to avoid some weird consequences (obtaining ReshapedArray instead of Array). I guess that it is safe to relax repmat instead, right?

@fredrikekre
Copy link
Member

Any reason this was reopened? Fixed by #20113

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

No branches or pull requests

4 participants