GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Matrix subset according to type of input by dvd101x · Pull Request #3485 · josdejong/mathjs Conversation
Collaborator
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: A = [1,2,3; 4,5,6] A[2,3] --> 6 A[[1,2],[2,3]] --> [2,3; 5,6] A[[2],[2,3]] --> [[5, 6]] A[2,[2,3]] --> [5,6] A[[1,2],[2]] --> [2; 5] // which is the same as [[2], [5]] A[[1,2],2] --> [2,5] A[[2], [2]] --> [[5]] A[2, [2]] --> [5] A[[2], 2] --> [5] A[[],[]] --> [] A[1,[]] --> [] A[[],1] --> []
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…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
Collaborator
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. # Conflicts: # AUTHORS # HISTORY.md
Owner
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Thanks for your review Jos,
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks Jos! It might be too complicated to change the behavior of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hi, this is still a work in progress but I think the overall implementation is working. Next steps are:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think it's mostly done, the only thing left is changing the documentation. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hi, I included the changes in documentation and it's ready for review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem 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?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks Jos, for your kind words and thorough review. Will address these topics and report back in the following days. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Published now in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.