lschoe / mpyc

MPyC: Multiparty Computation in Python
MIT License
367 stars 76 forks source link

Fix inconsistent integral property for various array manipulations #72

Closed MarcT0K closed 12 months ago

MarcT0K commented 1 year ago

Fix inconsistent integral property for various array manipulations (np_fliplr, np_block, np_swapaxes, and np_split) and add unit tests for various related functions.

See #67 for more details.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 96.29% and project coverage change: +0.06% :tada:

Comparison is base (b8d2d5d) 92.96% compared to head (aec164b) 93.02%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #72 +/- ## ========================================== + Coverage 92.96% 93.02% +0.06% ========================================== Files 16 16 Lines 8879 8902 +23 ========================================== + Hits 8254 8281 +27 + Misses 625 621 -4 ``` | [Files Changed](https://app.codecov.io/gh/lschoe/mpyc/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Berry+Schoenmakers) | Coverage Δ | | |---|---|---| | [mpyc/runtime.py](https://app.codecov.io/gh/lschoe/mpyc/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Berry+Schoenmakers#diff-bXB5Yy9ydW50aW1lLnB5) | `91.80% <96.29%> (+0.26%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/lschoe/mpyc/pull/72/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Berry+Schoenmakers)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

MarcT0K commented 1 year ago

I think this PR should cover all the remaining np functions (except the np_update covered by #70 ).

A possible last PR could be to factorize the code and replace all the rettype conditions by a helper function call. If you have a clean idea for such factorization, I would apply it on all these functions.