Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Added cases for sparse arrays in __mul__ and __rmul__ #16994
References to other Issues or PRs
Brief description of what is fixed or changed
The multiplcation is cast to a list while calculating each term, which is unnecessary for the zero value in sparse array. Thanks to the lazy-evaluation of iterator in NDimArray, this issue will not cause a MemoryError, but the operation is slow.
Since only the no-zero values in the dictionary are changed, this execution time is much ameliorated.
Your release notes are in good order.
Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.5.
Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it.
Click here to see the pull request description that was parsed.