-
Notifications
You must be signed in to change notification settings - Fork 42
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
Converting cinvertor python #1370
Conversation
both using njit() for now, tested multiple others with both, and not using map/lambdas using basic for for now. np.vectorize() and apply_along_axis() problem with njit()
…iew into converting_cinvertor_python
…iew into converting_cinvertor_python
… iq_smeared function
…testing other methods
…iew/sasview into converting_cinvertor_python
…fixes to py_invertor
I am not sure, but this may be the problem - ESS_GUI - So removing the reference to both pr.core and the extension_modules reference should leave - Could this have caused the build to fail? |
The build failed at the code signing stage - something we are investigating currently. Your changes didn't cause the failure. |
5.0 ready for testing on Win |
The installer now gets created but the resulting installation (at least on windows) fails. |
5.0 ready for testing on Win |
5.0 ready for testing on Win |
sorry to commit again after the build has been tested but found small bug, just method being called wrong, when testing pr inversion with smearing. It does work properly now though. |
Before merging, we need ortho_transformed in calc.py to use sinc function so that the calculation works when q is zero. There are other review comments, but these are for style and (minor) efficiency gains, not for bug fixes. Also, can't merge because of conflicts. |
Ready for testing on Win64 |
the 4.x version of this PR (#1038 ) was merged on October 1. As agreed this PR should NOT be merged for 5.01 but leaving it here to remind us that we need to eventually bring it into 5.x |
One unit test is failing - 1.0000.....2 !=1 . That seems like a rounding error? Perhaps it should be an AssertAlmostEqual? |
The tests are all now passing and as per agreement on Tuesday calls going back a while this is now ready to merge. Question for @wpotrzebowski or @rozyczko; given the plan for a 5.0.2 should we hold off for this week? or shall we just dump it in? the 4x version got merged a while back with no problems yet. One caveat: we really don't want to wait longer than this week or we will once again have to worry about keeping this branch up to date and yada yada -- trying desperately to clear our PR backlog. |
Speed should be almost identical to C with Numba, without for the initial load about 2x/3x slower but for individual calculations still almost identical to C.
Calculated results the same with or without Numba.
Accuracy, has a e-15 difference on the final output, also because of truncated pi used in invertor.c the outputs will be slightly different, e-05, e-04 relative error, but with truncated pi used in calc.py should revert to default error of e-15.
Would also like more tests with smeared data if possible.