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

Fix view(::MVTSeries, I, J) to return same type as getindex(::MVTSeries, I, J) #51

Merged
merged 7 commits into from
Apr 4, 2024

Conversation

bbejanov
Copy link
Member

@bbejanov bbejanov commented Jan 2, 2024

  • first index is MIT => regular view into the .values matrix with I and J translated accordingly
  • second index is a Symbol => TSeries
  • otherwise => MVTSeries

* first index is MIT => regular Vector view
* second index is a Symbol => TSeries(range, view())
* otherwise => MVTSeries(range, names, view())
@bbejanov bbejanov changed the title Fix view(::MVTSeries, I...) to return same type as getindex(::MVTSeries, I...) Fix view(::MVTSeries, I, J) to return same type as getindex(::MVTSeries, I, J) Jan 2, 2024
@bbejanov
Copy link
Member Author

bbejanov commented Jan 2, 2024

Also, added a method of Base.Broadcast.dotview(::MVTSeries, I, J), so broadcasting with single MIT in the first index, or single Symbol in the second index would still work.

@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.00%. Comparing base (bfa080d) to head (3f75994).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
+ Coverage   92.92%   93.00%   +0.07%     
==========================================
  Files          20       20              
  Lines        2942     2959      +17     
==========================================
+ Hits         2734     2752      +18     
+ Misses        208      207       -1     

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

@bbejanov bbejanov merged commit a078424 into master Apr 4, 2024
9 checks passed
@bbejanov bbejanov deleted the view branch April 4, 2024 20:43
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.

4 participants