-
Notifications
You must be signed in to change notification settings - Fork 169
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
Euler 37 repmat #683
base: master
Are you sure you want to change the base?
Euler 37 repmat #683
Conversation
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.
Thank you for this PR. II couldn't find a discussion about repmat
in the issues but it's in scope for stdlib. This still needs a spec entry in the stdlib_linalg spec doc. Let me know if you need my help with that.
Co-authored-by: Milan Curcic <[email protected]>
!! Creates large matrices from a small array, `repmat()` repeats the given values of the array to create the large matrix. | ||
!! ([Specification](../page/specs/stdlib_linalg.html# | ||
!! repmat-creates-large-matrices-from-a-small-array)) |
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.
What is the difference with the intrinsic spread
(i.e. "replicates a source array ncopies times along a specified dimension")?
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.
What is the difference with the intrinsic
spread
(i.e. "replicates a source array ncopies times along a specified dimension")?
"replicates a source ARRAY ncopies times along a specified dimension", this doesn't quite work for matrices (rank-2) as you will need to do some complicated trickery to reshape it.
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.
Actually ,Fortran's intrinsic array functions have some strange optimizations. It may generate temporary array and copy
. And ifort will be slow if you do some elemental-wise array operation.
Fortran 2d array repmat
#685