Skip to content
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

Fix identity decorator for when Numba unavailable #220

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

eufrizz
Copy link
Contributor

@eufrizz eufrizz commented Aug 10, 2023

Fix for #219

I noticed the decorator syntax was just wrong. Runs with the minimal code example in the issue.

Test results:

platform linux -- Python 3.6.9, pytest-7.0.1, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
configfile: pyproject.toml
plugins: typeguard-2.13.0, cov-4.0.0
collected 165 items                                                                                                                                                                                        

tests/test_calculus.py::test_subset_interpolation PASSED                                                                                                                                             [  0%]
tests/test_calculus.py::test_differentiation PASSED                                                                                                                                                  [  1%]
tests/test_calculus.py::test_antiderivative PASSED                                                                                                                                                   [  1%]
tests/test_calculus.py::test_integral PASSED                                                                                                                                                         [  2%]
tests/test_quaternion.py::test_quaternion_members PASSED                                                                                                                                             [  3%]
tests/test_quaternion.py::test_quaternion_constructors PASSED                                                                                                                                        [  3%]
tests/test_quaternion.py::test_constants PASSED                                                                                                                                                      [  4%]
tests/test_quaternion.py::test_isclose PASSED                                                                                                                                                        [  4%]
tests/test_quaternion.py::test_bad_conversions[q0] PASSED                                                                                                                                            [  5%]
tests/test_quaternion.py::test_bad_conversions[q1] PASSED                                                                                                                                            [  6%]
tests/test_quaternion.py::test_bad_conversions[q2] PASSED                                                                                                                                            [  6%]
tests/test_quaternion.py::test_bad_conversions[q3] PASSED                                                                                                                                            [  7%]
tests/test_quaternion.py::test_bad_conversions[q4] PASSED                                                                                                                                            [  7%]
tests/test_quaternion.py::test_bad_conversions[q5] PASSED                                                                                                                                            [  8%]
tests/test_quaternion.py::test_bad_conversions[q6] PASSED                                                                                                                                            [  9%]
tests/test_quaternion.py::test_bad_conversions[q7] PASSED                                                                                                                                            [  9%]
tests/test_quaternion.py::test_bad_conversions[q8] PASSED                                                                                                                                            [ 10%]
tests/test_quaternion.py::test_bad_conversions[q9] PASSED                                                                                                                                            [ 10%]
tests/test_quaternion.py::test_bad_conversions[q10] PASSED                                                                                                                                           [ 11%]
tests/test_quaternion.py::test_bad_conversions[q11] PASSED                                                                                                                                           [ 12%]
tests/test_quaternion.py::test_bad_conversions[q12] PASSED                                                                                                                                           [ 12%]
tests/test_quaternion.py::test_bad_conversions[q13] PASSED                                                                                                                                           [ 13%]
tests/test_quaternion.py::test_as_float_quat PASSED                                                                                                                                                  [ 13%]
tests/test_quaternion.py::test_vector_conversions PASSED                                                                                                                                             [ 14%]
tests/test_quaternion.py::test_as_rotation_matrix PASSED                                                                                                                                             [ 15%]
tests/test_quaternion.py::test_from_rotation_matrix PASSED                                                                                                                                           [ 15%]
tests/test_quaternion.py::test_as_rotation_vector PASSED                                                                                                                                             [ 16%]
tests/test_quaternion.py::test_from_rotation_vector PASSED                                                                                                                                           [ 16%]
tests/test_quaternion.py::test_rotate_vectors PASSED                                                                                                                                                 [ 17%]
tests/test_quaternion.py::test_allclose PASSED                                                                                                                                                       [ 18%]
tests/test_quaternion.py::test_from_spherical_coords PASSED                                                                                                                                          [ 18%]
tests/test_quaternion.py::test_as_spherical_coords PASSED                                                                                                                                            [ 19%]
tests/test_quaternion.py::test_from_euler_angles PASSED                                                                                                                                              [ 20%]
tests/test_quaternion.py::test_as_euler_angles PASSED                                                                                                                                                [ 20%]
tests/test_quaternion.py::test_quaternion_nonzero PASSED                                                                                                                                             [ 21%]
tests/test_quaternion.py::test_quaternion_isnan PASSED                                                                                                                                               [ 21%]
tests/test_quaternion.py::test_quaternion_isinf PASSED                                                                                                                                               [ 22%]
tests/test_quaternion.py::test_quaternion_isfinite PASSED                                                                                                                                            [ 23%]
tests/test_quaternion.py::test_quaternion_equal PASSED                                                                                                                                               [ 23%]
tests/test_quaternion.py::test_quaternion_not_equal PASSED                                                                                                                                           [ 24%]
tests/test_quaternion.py::test_quaternion_richcompare PASSED                                                                                                                                         [ 24%]
tests/test_quaternion.py::test_quaternion_absolute PASSED                                                                                                                                            [ 25%]
tests/test_quaternion.py::test_quaternion_norm PASSED                                                                                                                                                [ 26%]
tests/test_quaternion.py::test_quaternion_negative PASSED                                                                                                                                            [ 26%]
tests/test_quaternion.py::test_quaternion_conjugate PASSED                                                                                                                                           [ 27%]
tests/test_quaternion.py::test_quaternion_sqrt PASSED                                                                                                                                                [ 27%]
tests/test_quaternion.py::test_quaternion_square PASSED                                                                                                                                              [ 28%]
tests/test_quaternion.py::test_quaternion_log_exp PASSED                                                                                                                                             [ 29%]
tests/test_quaternion.py::test_angle PASSED                                                                                                                                                          [ 29%]
tests/test_quaternion.py::test_quaternion_normalized PASSED                                                                                                                                          [ 30%]
tests/test_quaternion.py::test_quaternion_parity_conjugates PASSED                                                                                                                                   [ 30%]
tests/test_quaternion.py::test_quaternion_copysign XFAIL                                                                                                                                             [ 31%]
tests/test_quaternion.py::test_quaternion_add PASSED                                                                                                                                                 [ 32%]
tests/test_quaternion.py::test_quaternion_add_ufunc PASSED                                                                                                                                           [ 32%]
tests/test_quaternion.py::test_quaternion_subtract PASSED                                                                                                                                            [ 33%]
tests/test_quaternion.py::test_quaternion_subtract_ufunc PASSED                                                                                                                                      [ 33%]
tests/test_quaternion.py::test_quaternion_multiply PASSED                                                                                                                                            [ 34%]
tests/test_quaternion.py::test_quaternion_multiply_ufunc PASSED                                                                                                                                      [ 35%]
tests/test_quaternion.py::test_quaternion_divide PASSED                                                                                                                                              [ 35%]
tests/test_quaternion.py::test_quaternion_divide_ufunc PASSED                                                                                                                                        [ 36%]
tests/test_quaternion.py::test_quaternion_power PASSED                                                                                                                                               [ 36%]
tests/test_quaternion.py::test_quaternion_getset PASSED                                                                                                                                              [ 37%]
tests/test_quaternion.py::test_metrics PASSED                                                                                                                                                        [ 38%]
tests/test_quaternion.py::test_unflip_rotors PASSED                                                                                                                                                  [ 38%]
tests/test_quaternion.py::test_slerp PASSED                                                                                                                                                          [ 39%]
tests/test_quaternion.py::test_squad PASSED                                                                                                                                                          [ 40%]
tests/test_quaternion.py::test_arrfuncs XFAIL                                                                                                                                                        [ 40%]
tests/test_quaternion.py::test_setitem_quat PASSED                                                                                                                                                   [ 41%]
tests/test_quaternion.py::test_arraydescr XFAIL                                                                                                                                                      [ 41%]
tests/test_quaternion.py::test_casts XFAIL                                                                                                                                                           [ 42%]
tests/test_quaternion.py::test_ufuncs PASSED                                                                                                                                                         [ 43%]
tests/test_quaternion.py::test_ufunc_existence[add] PASSED                                                                                                                                           [ 43%]
tests/test_quaternion.py::test_ufunc_existence[subtract] PASSED                                                                                                                                      [ 44%]
tests/test_quaternion.py::test_ufunc_existence[multiply] PASSED                                                                                                                                      [ 44%]
tests/test_quaternion.py::test_ufunc_existence[true_divide0] PASSED                                                                                                                                  [ 45%]
tests/test_quaternion.py::test_ufunc_existence[true_divide1] PASSED                                                                                                                                  [ 46%]
tests/test_quaternion.py::test_ufunc_existence[floor_divide] PASSED                                                                                                                                  [ 46%]
tests/test_quaternion.py::test_ufunc_existence[negative] PASSED                                                                                                                                      [ 47%]
tests/test_quaternion.py::test_ufunc_existence[positive] PASSED                                                                                                                                      [ 47%]
tests/test_quaternion.py::test_ufunc_existence[power] PASSED                                                                                                                                         [ 48%]
tests/test_quaternion.py::test_ufunc_existence[absolute] PASSED                                                                                                                                      [ 49%]
tests/test_quaternion.py::test_ufunc_existence[conjugate0] PASSED                                                                                                                                    [ 49%]
tests/test_quaternion.py::test_ufunc_existence[conjugate1] PASSED                                                                                                                                    [ 50%]
tests/test_quaternion.py::test_ufunc_existence[exp] PASSED                                                                                                                                           [ 50%]
tests/test_quaternion.py::test_ufunc_existence[log] PASSED                                                                                                                                           [ 51%]
tests/test_quaternion.py::test_ufunc_existence[sqrt] PASSED                                                                                                                                          [ 52%]
tests/test_quaternion.py::test_ufunc_existence[square] PASSED                                                                                                                                        [ 52%]
tests/test_quaternion.py::test_ufunc_existence[reciprocal] PASSED                                                                                                                                    [ 53%]
tests/test_quaternion.py::test_ufunc_existence[invert] PASSED                                                                                                                                        [ 53%]
tests/test_quaternion.py::test_ufunc_existence[less] PASSED                                                                                                                                          [ 54%]
tests/test_quaternion.py::test_ufunc_existence[less_equal] PASSED                                                                                                                                    [ 55%]
tests/test_quaternion.py::test_ufunc_existence[not_equal] PASSED                                                                                                                                     [ 55%]
tests/test_quaternion.py::test_ufunc_existence[equal] PASSED                                                                                                                                         [ 56%]
tests/test_quaternion.py::test_ufunc_existence[isfinite] PASSED                                                                                                                                      [ 56%]
tests/test_quaternion.py::test_ufunc_existence[isinf] PASSED                                                                                                                                         [ 57%]
tests/test_quaternion.py::test_ufunc_existence[isnan] PASSED                                                                                                                                         [ 58%]
tests/test_quaternion.py::test_ufunc_existence[copysign] PASSED                                                                                                                                      [ 58%]
tests/test_quaternion.py::test_ufunc_existence[logaddexp] XFAIL                                                                                                                                      [ 59%]
tests/test_quaternion.py::test_ufunc_existence[logaddexp2] XFAIL                                                                                                                                     [ 60%]
tests/test_quaternion.py::test_ufunc_existence[remainder0] XFAIL                                                                                                                                     [ 60%]
tests/test_quaternion.py::test_ufunc_existence[remainder1] XFAIL                                                                                                                                     [ 61%]
tests/test_quaternion.py::test_ufunc_existence[fmod0] XFAIL                                                                                                                                          [ 61%]
tests/test_quaternion.py::test_ufunc_existence[divmod] XFAIL                                                                                                                                         [ 62%]
tests/test_quaternion.py::test_ufunc_existence[fabs0] XFAIL                                                                                                                                          [ 63%]
tests/test_quaternion.py::test_ufunc_existence[rint] XFAIL                                                                                                                                           [ 63%]
tests/test_quaternion.py::test_ufunc_existence[sign] XFAIL                                                                                                                                           [ 64%]
tests/test_quaternion.py::test_ufunc_existence[heaviside] XFAIL                                                                                                                                      [ 64%]
tests/test_quaternion.py::test_ufunc_existence[exp2] XFAIL                                                                                                                                           [ 65%]
tests/test_quaternion.py::test_ufunc_existence[log2] XFAIL                                                                                                                                           [ 66%]
tests/test_quaternion.py::test_ufunc_existence[log10] XFAIL                                                                                                                                          [ 66%]
tests/test_quaternion.py::test_ufunc_existence[expm1] XFAIL                                                                                                                                          [ 67%]
tests/test_quaternion.py::test_ufunc_existence[log1p] XFAIL                                                                                                                                          [ 67%]
tests/test_quaternion.py::test_ufunc_existence[cbrt] XFAIL                                                                                                                                           [ 68%]
tests/test_quaternion.py::test_ufunc_existence[gcd] XFAIL                                                                                                                                            [ 69%]
tests/test_quaternion.py::test_ufunc_existence[lcm] XFAIL                                                                                                                                            [ 69%]
tests/test_quaternion.py::test_ufunc_existence[sin] XFAIL                                                                                                                                            [ 70%]
tests/test_quaternion.py::test_ufunc_existence[cos] XFAIL                                                                                                                                            [ 70%]
tests/test_quaternion.py::test_ufunc_existence[tan] XFAIL                                                                                                                                            [ 71%]
tests/test_quaternion.py::test_ufunc_existence[arcsin] XFAIL                                                                                                                                         [ 72%]
tests/test_quaternion.py::test_ufunc_existence[arccos] XFAIL                                                                                                                                         [ 72%]
tests/test_quaternion.py::test_ufunc_existence[arctan] XFAIL                                                                                                                                         [ 73%]
tests/test_quaternion.py::test_ufunc_existence[arctan2] XFAIL                                                                                                                                        [ 73%]
tests/test_quaternion.py::test_ufunc_existence[hypot] XFAIL                                                                                                                                          [ 74%]
tests/test_quaternion.py::test_ufunc_existence[sinh] XFAIL                                                                                                                                           [ 75%]
tests/test_quaternion.py::test_ufunc_existence[cosh] XFAIL                                                                                                                                           [ 75%]
tests/test_quaternion.py::test_ufunc_existence[tanh] XFAIL                                                                                                                                           [ 76%]
tests/test_quaternion.py::test_ufunc_existence[arcsinh] XFAIL                                                                                                                                        [ 76%]
tests/test_quaternion.py::test_ufunc_existence[arccosh] XFAIL                                                                                                                                        [ 77%]
tests/test_quaternion.py::test_ufunc_existence[arctanh] XFAIL                                                                                                                                        [ 78%]
tests/test_quaternion.py::test_ufunc_existence[deg2rad] XFAIL                                                                                                                                        [ 78%]
tests/test_quaternion.py::test_ufunc_existence[rad2deg] XFAIL                                                                                                                                        [ 79%]
tests/test_quaternion.py::test_ufunc_existence[bitwise_and] XFAIL                                                                                                                                    [ 80%]
tests/test_quaternion.py::test_ufunc_existence[bitwise_or] XFAIL                                                                                                                                     [ 80%]
tests/test_quaternion.py::test_ufunc_existence[bitwise_xor] XFAIL                                                                                                                                    [ 81%]
tests/test_quaternion.py::test_ufunc_existence[left_shift] XFAIL                                                                                                                                     [ 81%]
tests/test_quaternion.py::test_ufunc_existence[right_shift] XFAIL                                                                                                                                    [ 82%]
tests/test_quaternion.py::test_ufunc_existence[greater] XFAIL                                                                                                                                        [ 83%]
tests/test_quaternion.py::test_ufunc_existence[greater_equal] XFAIL                                                                                                                                  [ 83%]
tests/test_quaternion.py::test_ufunc_existence[logical_and] XFAIL                                                                                                                                    [ 84%]
tests/test_quaternion.py::test_ufunc_existence[logical_or] XFAIL                                                                                                                                     [ 84%]
tests/test_quaternion.py::test_ufunc_existence[logical_xor] XFAIL                                                                                                                                    [ 85%]
tests/test_quaternion.py::test_ufunc_existence[logical_not] XFAIL                                                                                                                                    [ 86%]
tests/test_quaternion.py::test_ufunc_existence[maximum] XFAIL                                                                                                                                        [ 86%]
tests/test_quaternion.py::test_ufunc_existence[minimum] XFAIL                                                                                                                                        [ 87%]
tests/test_quaternion.py::test_ufunc_existence[fmax] XFAIL                                                                                                                                           [ 87%]
tests/test_quaternion.py::test_ufunc_existence[fmin] XFAIL                                                                                                                                           [ 88%]
tests/test_quaternion.py::test_ufunc_existence[isnat] XFAIL                                                                                                                                          [ 89%]
tests/test_quaternion.py::test_ufunc_existence[fabs1] XFAIL                                                                                                                                          [ 89%]
tests/test_quaternion.py::test_ufunc_existence[signbit] XFAIL                                                                                                                                        [ 90%]
tests/test_quaternion.py::test_ufunc_existence[nextafter] XFAIL                                                                                                                                      [ 90%]
tests/test_quaternion.py::test_ufunc_existence[spacing] XFAIL                                                                                                                                        [ 91%]
tests/test_quaternion.py::test_ufunc_existence[modf] XFAIL                                                                                                                                           [ 92%]
tests/test_quaternion.py::test_ufunc_existence[ldexp] XFAIL                                                                                                                                          [ 92%]
tests/test_quaternion.py::test_ufunc_existence[frexp] XFAIL                                                                                                                                          [ 93%]
tests/test_quaternion.py::test_ufunc_existence[fmod1] XFAIL                                                                                                                                          [ 93%]
tests/test_quaternion.py::test_ufunc_existence[floor] XFAIL                                                                                                                                          [ 94%]
tests/test_quaternion.py::test_ufunc_existence[ceil] XFAIL                                                                                                                                           [ 95%]
tests/test_quaternion.py::test_ufunc_existence[trunc] XFAIL                                                                                                                                          [ 95%]
tests/test_quaternion.py::test_numpy_array_conversion PASSED                                                                                                                                         [ 96%]
tests/test_quaternion.py::test_not_implemented PASSED                                                                                                                                                [ 96%]
tests/test_quaternion.py::test_integrate_angular_velocity PASSED                                                                                                                                     [ 97%]
tests/test_quaternion.py::test_mean_rotor_in_chordal_metric PASSED                                                                                                                                   [ 98%]
tests/test_quaternion.py::test_optimal_alignment_in_Euclidean_metric PASSED                                                                                                                          [ 98%]
tests/test_quaternion.py::test_numpy_save_and_load PASSED                                                                                                                                            [ 99%]
tests/test_quaternion.py::test_pickle PASSED   

@eufrizz eufrizz force-pushed the fixIdentityDecorator branch from 17ed6a2 to 2af481e Compare August 10, 2023 00:57
@moble moble merged commit c697de5 into moble:main Nov 30, 2023
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants