lincc-frameworks / lincc-frameworks/nested-pandas
`map_rows(njit=True)` Improvements
- Dominant language
- Python
- Stars
- 26
- Forks
- 8
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 9
Description
This issue suggests a number of improvements to the map_rows njit feature implemented in: #451
* put comments in tests to the with pytest.raises blocks to explain why we expect it to fail.
* in tests use numpy.testing.assert_allclose/assert_array_equal and friends instead of for i in range(len(result1)): blocks
* Early exits with return would reduce amount of conditional blocks in `_apply_njit_map_rows`
* [Leave `_apply_njit_map_rows` results as is without converting to lists, to avoid translation costs](https://github.com/lincc-frameworks/nested-pandas/pull/451/changes/BASE..4c6d4c2376394392a5761d7138fff04e022a2771#r2891079666)
* [use .list_offsets for nestedseries directly](https://github.com/lincc-frameworks/nested-pandas/pull/451/changes/BASE..4c6d4c2376394392a5761d7138fff04e022a2771#r2891088632)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the tests for map_rows(njit=True) and the `_apply_njit_map_rows` implementation, then review the referenced changes in pull request #451. Address the listed test assertion and exception-comment improvements, early returns, result handling, and direct `.list_offsets` use. Done means the affected tests pass and the implementation no longer performs the unnecessary conversions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100