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

Numpy depreciation of numpy.complexthrows error in fsync_network #700

Open
djpasseyjr opened this issue Jan 31, 2024 · 0 comments
Open

Numpy depreciation of numpy.complexthrows error in fsync_network #700

djpasseyjr opened this issue Jan 31, 2024 · 0 comments

Comments

@djpasseyjr
Copy link

Running the following code with numpy 1.2+

from pyclustering.nnet.fsync import fsync_network

# Prepare oscillatory network parameters.
amount_oscillators = 3;
frequency = 1.0;
radiuses = [1.0, 2.0, 3.0];
coupling_strength = 1.0;

# Create oscillatory network
oscillatory_network = fsync_network(amount_oscillators, frequency, radiuses, coupling_strength);

# Simulate network during 200 steps on 10 time-units of time-axis.
output_dynamic = oscillatory_network.simulate(200, 10, True); 

Gives the error:

AttributeError: module 'numpy' has no attribute 'complex'.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

I'm not familiar with this package but it's possible that replacing np.complex with complex will fix this problem. I'll try forking and if it's not too involved I'll submit a PR.

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

1 participant