min-guk opened a new pull request, #2103:
URL: https://github.com/apache/systemds/pull/2103
This PR implements a new roll reorg function in CP and provides test scripts
using Python.
1. Implementation of roll function for dense and sparse matrices in CP,
along with test code
- Similar to `rev`, dense column vectors are rolled column-wise, while the
rest are rolled row-wise.
2. Support for Python test code and additional test cases
- Since R does not provide a `roll` function, baseline test scripts were
written using Python's numpy `roll` function.
- Added support for executing the test code in Python. Although there is
some overlap with the R script execution code, I avoided modifying or
refactoring the existing code to minimize changes.
- However, due to slight differences in the `mtx` format between R and
Python, I made the following modifications to the `mtx` file input/output code:
- `TestUtils::writeTestMatrix()`: The last number in the mtx header should
represent the number of non-zero elements in the matrix, but the previous input
test matrix was showing the total number of elements, which caused an error in
Python. (https://networkrepository.com/mtx-matrix-market-format.html)
- `TestUtils::readRMatrixFromFS()`: While R writes the mtx header in 2
lines, Python's scipy writes it in 3 lines, including an extra line with just a
%. I modified the code to ignore this blank line.
Please feel free to share any feedback or suggestions regarding the
implementation direction.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]