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

AggregateGeneric fails with np.median #69

Open
ml31415 opened this issue Nov 28, 2022 · 0 comments
Open

AggregateGeneric fails with np.median #69

ml31415 opened this issue Nov 28, 2022 · 0 comments
Labels

Comments

@ml31415
Copy link
Owner

ml31415 commented Nov 28, 2022

import numpy as np
import numpy_groupies as npg

idx = np.arange(100).repeat(100)
d = np.random.random(10000)
npg.aggregate(idx, d, np.median)

And we get:

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Internal error at <numba.core.typeinfer.CallConstraint object at 0x7f30ed04a230>.
Failed in nopython mode pipeline (step: analyzing bytecode)
Use of unsupported opcode (DICT_MERGE) found

File "<__array_function__ internals>", line 179:
<source missing, REPL/exec in use?>

During: resolving callee type: type(CPUDispatcher(<function median at 0x7f3110dbe3b0>))
During: typing of call at /home/michael/.local/lib/python3.10/site-packages/numpy_groupies/aggregate_numba.py (247)

Enable logging at debug level for details.

File ".local/lib/python3.10/site-packages/numpy_groupies/aggregate_numba.py", line 247:
        def loop(sortidx, group_idx, a, ret):
            <source elided>
                    raise ValueError("one or more indices in group_idx are too large")
                ret[ri] = func(a_srt[start_idx:stop_idx])

@ml31415 ml31415 added the bug label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant