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

DeprecationWarning #17

Open
riccstef opened this issue May 14, 2024 · 2 comments
Open

DeprecationWarning #17

riccstef opened this issue May 14, 2024 · 2 comments

Comments

@riccstef
Copy link

Running the example code for fathon.HT I get this numpy warning:

DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)

@stfbnc
Copy link
Owner

stfbnc commented May 21, 2024

Hi @riccstef, which version of fathon and which OS are you using?

Could you also give me a minimal sample code to reproduce the warning?

@riccstef
Copy link
Author

Hi @stfbnc, fathon 1.3.3.post1 running on Windows 10 x64.

I get this error running any on the sample codes provided, for example running

import numpy as np
import fathon
from fathon import fathonUtils as fu

a = np.random.randn(10000)
b = np.random.randn(10000)

a = fu.toAggregated(a)
b = fu.toAggregated(b)

pyht = fathon.HT(a)

scales = [100, 200, 1000]
mfdfaPolOrd = 1
polOrd = 1

ht = pyht.computeHt(scales, mfdfaPolOrd=mfdfaPolOrd, polOrd=polOrd)

I get

DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before
performing this operation. (Deprecated NumPy 1.25.)
ht = pyht.computeHt(scales, mfdfaPolOrd=mfdfaPolOrd, polOrd=polOrd)

Thanks for the help

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