Skip to content

Accept any integer pair for nmfmerge ncomponents - #56

Merged
timholy merged 1 commit into
mainfrom
teh/integer
Jun 28, 2026
Merged

timholy merged 1 commit into
mainfrom
teh/integer

Conversation

@timholy

@timholy timholy commented Jun 28, 2026

Copy link
Copy Markdown
Member

nmfmerge's Pair methods were restricted to Pair{Int,Int}, so Pair{Int32,Int32}
and mixed integer pairs hit a MethodError. Add a widening method that coerces
any Pair{<:Integer,<:Integer} to Int => Int and delegates to the existing
implementation, and widen the no-penalty Pair method likewise.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

nmfmerge's Pair methods were restricted to Pair{Int,Int}, so Pair{Int32,Int32}
and mixed integer pairs hit a MethodError. Add a widening method that coerces
any Pair{<:Integer,<:Integer} to Int => Int and delegates to the existing
implementation, and widen the no-penalty Pair method likewise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@timholy
timholy merged commit 0195f36 into main Jun 28, 2026
2 checks passed
@timholy
timholy deleted the teh/integer branch June 28, 2026 20:16
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