Conversation
milancurcic
left a comment
There was a problem hiding this comment.
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 <caomaco@gmail.com>
| !! 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.
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.
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.
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