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

added Base.eltype() method for MultiExponents #136

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jbshannon
Copy link

collect called on MultiExponents is type-unstable because MultiExponents has no defined eltype. This PR adds a method for Base.eltype() so that collect returns a Vector{Vector{Int64}} rather than a Vector{Any}.

Before:

julia> collect(multiexponents(3, 2))
6-element Array{Any,1}:
 [2, 0, 0]
 [1, 1, 0]
 [1, 0, 1]
 [0, 2, 0]
 [0, 1, 1]
 [0, 0, 2]

After:

julia> collect(multiexponents(3, 2))
6-element Vector{Vector{Int64}}:
 [2, 0, 0]
 [1, 1, 0]
 [1, 0, 1]
 [0, 2, 0]
 [0, 1, 1]
 [0, 0, 2]

@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ac70c46) 96.97% compared to head (2ddfe36) 96.98%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #136   +/-   ##
=======================================
  Coverage   96.97%   96.98%           
=======================================
  Files           7        7           
  Lines         728      729    +1     
=======================================
+ Hits          706      707    +1     
  Misses         22       22           
Impacted Files Coverage Δ
src/multinomials.jl 92.85% <100.00%> (+0.54%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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