Skip to content

Conversation

@jbshannon
Copy link
Contributor

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

All modified and coverable lines are covered by tests ✅

Project coverage is 97.14%. Comparing base (ac70c46) to head (1497df6).
Report is 23 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   96.97%   97.14%   +0.16%     
==========================================
  Files           7        8       +1     
  Lines         728      806      +78     
==========================================
+ Hits          706      783      +77     
- Misses         22       23       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@inkydragon inkydragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@inkydragon inkydragon changed the title added Base.eltype() method for MultiExponents Make multiexponents type stable May 1, 2025
@inkydragon inkydragon added this to the v1.0.3 milestone May 1, 2025
@inkydragon inkydragon merged commit c92ed05 into JuliaMath:master May 2, 2025
12 checks passed
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.

2 participants