Skip to content

Conversation

@theogf
Copy link
Member

@theogf theogf commented Feb 6, 2024

Summary
Add the _sum interface for vectors, allowing to use Vector in KernelSum. This is to fix #497

Proposed changes

Add a method for _sum and add the same tests existing for KerrnelSum{<:Tuple} to KernelSum{<:AbstractVector}.

  • ...

What alternatives have you considered?
🤷

Breaking changes
none

@codecov
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (49049b1) 90.88% compared to head (42316d9) 90.89%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #547   +/-   ##
=======================================
  Coverage   90.88%   90.89%           
=======================================
  Files          52       52           
  Lines        1459     1460    +1     
=======================================
+ Hits         1326     1327    +1     
  Misses        133      133           

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


_sum(f, ks::Tuple, args...) = f(first(ks), args...) + _sum(f, Base.tail(ks), args...)
_sum(f, ks::Tuple{Tx}, args...) where {Tx} = f(only(ks), args...)
_sum(f, ks::AbstractVector, args...) = sum(k -> f(k, args...), ks)
Copy link
Member

Choose a reason for hiding this comment

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

Codecov says the line is not covered by tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Strange, the Github annotation was complaining about this line.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

But I trust the codecov webpage more, maybe the annotation is just outdated.

@theogf theogf merged commit 87623ff into master Feb 8, 2024
@theogf theogf deleted the tgf/fix-sum branch February 8, 2024 16: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.

KernelSum and KernelProduct with Vector of Kernel fails

3 participants