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

RecursionError with weighted numpy average #1609

Open
njlivesey opened this issue Oct 14, 2022 · 0 comments
Open

RecursionError with weighted numpy average #1609

njlivesey opened this issue Oct 14, 2022 · 0 comments
Labels
numpy Numpy related bug/enhancement

Comments

@njlivesey
Copy link

As described in the subject, the MWE below gives a RecursionError

(pint 0.19.2, python 3.10, numpy 1.22.3)

import numpy as np
import pint
ureg = pint.UnitRegistry()

x = np.ones(shape=[5, 10]) * ureg.dimensionless
w = np.ones(shape=[10]) * ureg.dimensionless
a = np.average(x, weights=w, axis=1)
@hgrecco hgrecco added the numpy Numpy related bug/enhancement label Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
numpy Numpy related bug/enhancement
Projects
None yet
Development

No branches or pull requests

2 participants