Matrix: remove limitation to numerical entries#39
Open
Conversation
- removed checks - simplified syntax - standardized error handling
Contributor
Author
|
As far as I can see, the main trouble occurs with the overridden standard methods like collect and put, which are used in UGen math. |
Contributor
Author
|
Here are examples of what doesn't work: a = Matrix.with([[3.0, 2], [1.2, 3]] * DC.ar(1.2));
b = 8;
a + b // OK
b + a // OK
b = DC.ar(8);
a + b // fails
b + a // fails
b = DC.kr(8);
a + b // fails
b + a // failsThere is nothing inherent about this, it could work, but there are so many overridden non-standard methods in Matrix that I think it might be better to start with a new class, or even add the matrix methods to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is experimental and will need careful checking.
For prior discussion see: #38
There are also improvements to error handling in the
Matrixclass.I am not the expert user for matrices, so it would be good if others could write up tests.
We can put them into unit tests once we have collected them.
Here is some code that makes testing easy: