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

only 1d indexing currentlysupported with axis arg #74

Open
joshua-gould opened this issue Jan 13, 2023 · 0 comments
Open

only 1d indexing currentlysupported with axis arg #74

joshua-gould opened this issue Jan 13, 2023 · 0 comments
Labels

Comments

@joshua-gould
Copy link

Unable to run the example "Use the axis arg in order to do a sum-aggregation on three rows simultaneously" in README.md

import numpy as np

import numpy_groupies as npg

a = np.array([[99, 2, 11, 14, 20],
              [33, 76, 12, 100, 71],
              [67, 10, -8, 1, 9]])
group_idx = np.array([[3, 3, 7, 0, 0]])
x = npg.aggregate(group_idx, a, axis=1)

Error:

Traceback (most recent call last):
  File "test.py", line 9, in <module>
    x = npg.aggregate(group_idx, a, axis=1)
  File "numpy-groupies/numpy_groupies/aggregate_numba.py", line 563, in aggregate
    return func(group_idx, a, size, fill_value, order, dtype, axis, **kwargs)
  File "numpy-groupies/numpy_groupies/aggregate_numba.py", line 51, in __call__
    iv = input_validation(
  File "numpy-groupies/numpy_groupies/utils_numpy.py", line 317, in input_validation
    raise NotImplementedError(
NotImplementedError: only 1d indexing currentlysupported with axis arg.
@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

2 participants