-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Feature Request: Array/Matrix From Function #2153
Labels
Comments
That is a really nice idea! Anyone interested in implementing this function? |
Really cool! |
josdejong
added a commit
that referenced
this issue
May 9, 2021
* made dense and sparse matrices iterable, fixed #1184 * added matrixFromFunction, fixes #2153 * added tests for matrixFromFunction * added matrixFromRows * added matrixFromColumns * added rows() and columns() for dense matrix * improved sparse documentation a tiny bit * fix linting issues * added matrixFromRow/Column to seealso of row and column * removed unnecessary duplication from matrixFromRows/Columns * added babel runtime Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
Published in |
joshhansen
pushed a commit
to LearnSomethingTeam/mathjs
that referenced
this issue
Sep 16, 2021
* made dense and sparse matrices iterable, fixed josdejong#1184 * added matrixFromFunction, fixes josdejong#2153 * added tests for matrixFromFunction * added matrixFromRows * added matrixFromColumns * added rows() and columns() for dense matrix * improved sparse documentation a tiny bit * fix linting issues * added matrixFromRow/Column to seealso of row and column * removed unnecessary duplication from matrixFromRows/Columns * added babel runtime Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like NumPy's
fromfunction
would be cool, specify a shape and a function to create an array or a matrix. E.g.math.fromFunction((x, y) => x * y, [3, 3])
would return[[0, 0, 0], [0, 1, 2], [0, 2, 4]]
.The text was updated successfully, but these errors were encountered: