Skip to content

fix(algorithm): updated matAlgo07xSSf algorithm to return sparse matrix - #3307

Merged
josdejong merged 6 commits into
josdejong:v14from
Aakash-Rana:bugfix
Nov 6, 2024
Merged

fix(algorithm): updated matAlgo07xSSf algorithm to return sparse matrix#3307
josdejong merged 6 commits into
josdejong:v14from
Aakash-Rana:bugfix

Conversation

@Aakash-Rana

@Aakash-Rana Aakash-Rana commented Nov 1, 2024

Copy link
Copy Markdown
Contributor

Updated matAlgo07xSSf algorithm and fixed #3219

This PR addresses an issue in the matAlgo07xSSf algorithm, where the result of any operation on two sparse matrices returning a dense matrix instead of preserving the sparse matrix format. This function matAlgo07xSSf is utilized by various functions such as dotDivide , dotPow , bitXor , larger , smaller , equal , xor , smallerEq etc - to perform operations on sparse matrices.

The update ensures that the result of any sparse-sparse operation is correctly returned as a sparse matrix, maintaining consistency with the input types.

Changes:

  • Refactored the matAlgo07xSSf algorithm to handle operations of sparse-sparse matrix ensuring only non-zero or true results are stored.
  • Adjusted dependencies to properly handle sparse matrix operations.
  • Updated corresponding test cases to compare result with sparse matrix.

@race-of-sloths Include this PR

@race-of-sloths

race-of-sloths commented Nov 1, 2024

Copy link
Copy Markdown

@Aakash-Rana Thank you for your contribution! Your pull request is now a part of the Race of Sloths!
Do you want to apply for monthly streak? Get 8+ score for a single PR this month and receive boost for race-of-sloths!

Shows inviting banner with latest news.

Shows profile picture for the author of the PR

Current status: executed
Reviewer Score
@josdejong 13

Your contribution is much appreciated with a final score of 13!
You have received 140 (130 base + 10 monthly bonus) Sloth points for this contribution

@josdejong received 25 Sloth Points for reviewing and scoring this pull request.

Congratulations @Aakash-Rana! Your PR was highly scored and you completed another monthly streak! To keep your monthly streak make another pull request next month and get 8+ score for it

What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow

For contributors:

  • Tag @race-of-sloths inside your pull requests
  • Wait for the maintainer to review and score your pull request
  • Check out your position in the Leaderboard
  • Keep weekly and monthly streaks to reach higher positions
  • Boast your contributions with a dynamic picture of your Profile

For maintainers:

  • Score pull requests that participate in the Race of Sloths
  • Engage contributors with fair scoring and fast responses so they keep their streaks
  • Promote the Race to the point where the Race starts promoting you
  • Grow the community of your contributors

Feel free to check our website for additional details!

Bot commands
  • For contributors
    • Include a PR: @race-of-sloths include to enter the Race with your PR
  • For maintainers:
    • Invite contributor @race-of-sloths invite to invite the contributor to participate in a race or include it, if it's already a runner.
    • Assign points: @race-of-sloths score [1/2/3/5/8/13] to award points based on your assessment.
    • Reject this PR: @race-of-sloths exclude to send this PR back to the drawing board.
    • Exclude repo: @race-of-sloths pause to stop bot activity in this repo until @race-of-sloths unpause command is called

@rana-aakash rana-aakash mentioned this pull request Nov 1, 2024
@akorchyn

akorchyn commented Nov 1, 2024

Copy link
Copy Markdown

Hello. First of all, sorry for hopping in the PR.
I just wanted to share that we have added a repo to the supported list. You can keep using it here. Enjoy!

@josdejong
josdejong changed the base branch from develop to v14 November 6, 2024 15:53
@josdejong

Copy link
Copy Markdown
Owner

Thanks @Aakash-Rana, this is a neat fix!

I'll merge this PR into the first next major version v14 since it changes the behavior of the functions like dotDivide and dotPow.

@josdejong
josdejong merged commit 66775ee into josdejong:v14 Nov 6, 2024
@race-of-sloths

Copy link
Copy Markdown

🥁 Score it!

@josdejong, please score the PR with @race-of-sloths score [1/2/3/5/8/13]. The contributor deserves it.
If no scoring is provided within 24 hours, this PR will be scored as 2 🦥

@josdejong josdejong added this to the v14 milestone Nov 6, 2024
@Aakash-Rana

Copy link
Copy Markdown
Contributor Author

Hello @josdejong
Thanks for the review. Yes it could be a breaking change and should go in the next major release.

@josdejong

Copy link
Copy Markdown
Owner

@race-of-sloths score 13

@Aakash-Rana
Aakash-Rana deleted the bugfix branch November 15, 2024 07:46
@josdejong josdejong mentioned this pull request Nov 20, 2024
7 tasks
@josdejong

Copy link
Copy Markdown
Owner

Published now in v14.0.0.

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.

dotDivide changes to denseMatrix when the inputs are sparseMatrix

6 participants