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

Issues with Numba 0.55.2 #103

Closed
bendikhk opened this issue Jul 7, 2022 · 4 comments
Closed

Issues with Numba 0.55.2 #103

bendikhk opened this issue Jul 7, 2022 · 4 comments

Comments

@bendikhk
Copy link

bendikhk commented Jul 7, 2022

We are experiencing errors with Resampy 0.3.0 and Numba 0.55.2. Downgrading to Resampy 0.2.2 fixes the issue.
Error log below.

` TypingError('Failed in nopython mode pipeline (step: nopython frontend)\n\x1b[1m\x1b[1mNo implementation of function F...ta[offset + i * index_step])\n\x1b[1m y[t] += weight * x[n-i]\n\x1b[0m \x1b[1m^\x1b[0m\x1b[0m\n')
issue_type = 'typing'

def error_rewrite(e, issue_type):
    """
    Rewrite and raise Exception `e` with help supplied based on the
    specified issue_type.
    """
    if config.SHOW_HELP:
        help_msg = errors.error_extras[issue_type]
        e.patch_message('\n'.join((str(e).rstrip(), help_msg)))
    if config.FULL_TRACEBACKS:
        raise e
    else:
       raise e.with_traceback(None)
       numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
       No implementation of function Function(<built-in function iadd>) found for signature:
        
        >>> iadd(array(int32, 1d, C), array(float64, 1d, C))
        
       There are 16 candidate implementations:
          - Of which 12 did not match due to:
          Overload of function 'iadd': File: <numerous>: Line N/A.
            With argument(s): '(array(int32, 1d, C), array(float64, 1d, C))':
           No match.
          - Of which 2 did not match due to:
          Overload in function 'NumpyRulesInplaceArrayOperator.generic': File: numba/core/typing/npydecl.py: Line 244.
            With argument(s): '(array(int32, 1d, C), array(float64, 1d, C))':
           Rejected as the implementation raised a specific error:
             AttributeError: 'NoneType' object has no attribute 'args'
         raised from /home/user/anaconda3/envs/env/lib/python3.9/site-packages/numba/core/typing/npydecl.py:255
          - Of which 2 did not match due to:
          Operator Overload in function 'iadd': File: unknown: Line unknown.
            With argument(s): '(array(int32, 1d, C), array(float64, 1d, C))':
           No match for registered cases:
            * (int64, int64) -> int64
            * (int64, uint64) -> int64
            * (uint64, int64) -> int64
            * (uint64, uint64) -> uint64
            * (float32, float32) -> float32
            * (float64, float64) -> float64
            * (complex64, complex64) -> complex64
            * (complex128, complex128) -> complex128
       
       During: typing of intrinsic-call at /home/user/anaconda3/envs/env/lib/python3.9/site-packages/resampy/interpn.py (44)
       
       File "../../anaconda3/envs/env/lib/python3.9/site-packages/resampy/interpn.py", line 44:
       def _resample_f(x, y, t_out, interp_win, interp_delta, num_table, scale=1.0):
           <source elided>
                   weight = (interp_win[offset + i * index_step] + eta * interp_delta[offset + i * index_step])
                   y[t] += weight * x[n-i]
                   ^

../../anaconda3/envs/env/lib/python3.9/site-packages/numba/core/dispatcher.py:409: TypingError
`

@bmcfee
Copy link
Owner

bmcfee commented Jul 7, 2022

Can you provide an example that triggers this error? My hunch here is that it's not a numba version issue (I'm also on 0.55.2) but something is coming up integer-typed when it needs to be floating point.

@bmcfee
Copy link
Owner

bmcfee commented Jul 7, 2022

@bendikhk just as a heads up, the PR I just merged (#104) might resolve this issue for you. If you have a chance, could you try installing it and give it a whirl? If it does fix it for you, I'll push the 0.3.1 release. If it doesn't, I'd like to get your issue resolved before release.

@bendikhk
Copy link
Author

bendikhk commented Jul 7, 2022

@bmcfee Yep, the fix has resolved our issue. Thank you for the quick response! :)

@bmcfee
Copy link
Owner

bmcfee commented Jul 7, 2022

Excellent, thanks for letting me know. I'll push the release then.

@bmcfee bmcfee closed this as completed Jul 7, 2022
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

No branches or pull requests

2 participants