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

first(permutations(first(combinations(1:2,0)))) type instability #46

Closed
rleegates opened this issue Feb 15, 2017 · 2 comments
Closed

first(permutations(first(combinations(1:2,0)))) type instability #46

rleegates opened this issue Feb 15, 2017 · 2 comments

Comments

@rleegates
Copy link

As the title suggests:

julia> first(permutations(first(combinations(1:2,0))))
0-element Array{Any,1}
@StreetLevel
Copy link

StreetLevel commented Feb 16, 2017

Another small example:

While collect is type stable,

julia> collect(permutations(1:N,K))[1]
0-element Array{Int64,1}

first returns a Vector{Any}

julia> first(permutations(1:N,K))
0-element Array{Any,1}

@randy3k
Copy link
Contributor

randy3k commented Jun 21, 2017

Here are the results of v0.6, it seems that the issue is fixed.

julia> first(combinations(1:2,0))
0-element Array{Int64,1}

julia> first(permutations(1:2,0))
0-element Array{Int64,1}

julia> first(permutations(first(combinations(1:2,0))))
0-element Array{Int64,1}

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