-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Matrix subset according to type of input #3485
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
Conversation
…y % operator (modulus) (#3432)
…y % operator (modulus) (#3432)
Previously `math.kron()` always returned a 2D matrix, and could not handle 3D or greater arrays. Now it always returns an array of the max dimension of its arguments. Resolves #1753. --------- Co-authored-by: Delaney Sylvans <[email protected]>
# Conflicts: # docs/expressions/syntax.md
I think it's mostly ready for review. Just wanted to review the following, The elements of an index are called ranges like So I was thinking if in the documentation and maybe in the code to find a more general name for the elements of an index like As a reference in numpy it's more like you slice with indices and there is no index class. So you slice |
# Conflicts: # AUTHORS # HISTORY.md
The code looks really neat, thanks David! Some thoughts:
|
Thanks for your review Jos,
|
Regarding the benchmarks, I said something wrong. The current benchmarks already take into account the index creation. The main benefit is the index creation, if tested on its own it's about twice as fast. But if tested on slicing as I said it's slightly faster. So this task was already done. Regarding the new behavior, I think it's possible to do the config flag, what would be a good name for it? Like |
Thanks for testing the performance David, most important is that there is not a sudden detoriation. Little performance improvements are of course always welcome :)
Great to hear a config flag is most likely possible. I think we should give it a name specific for this very subset/index refactoring. Something like |
Thanks Jos! It might be too complicated to change the behavior of |
Hi, this is still a work in progress but I think the overall implementation is working. Next steps are:
|
I think it's mostly done, the only thing left is changing the documentation. |
Hi, I included the changes in documentation and it's ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks David, this is an impressive piece of work! I'm really happy you managed to implement the legacySubset
config option, without it it will be a really painful upgrade for many users I think.
I made a few minor inline comments, can you have a look at those?
Thanks Jos, for your kind words and thorough review. Will address these topics and report back in the following days. |
Hi, the topics are addressed in general, please let me know if the chapter of migration with this new behavior should be more in detail or with a different focus. |
Hi Jos,
This addresses #2344
It changes the behavior of index to accommodate for scalar indices and the size of the output depends on the input.
I'm still doing some tests and reviewing what documentation needs to change, but it all seems to work according to:
#2344 (comment)