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

Make it compatible with numpy > 1.16 #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jfosorio
Copy link

In version of numpy higher than 1.16 the third argument of linspace is not be interpreted as integer and would produce and error.

https://docs.scipy.org/doc/numpy/release.html?highlight=histogram

Then matrix d_mat need to be initialized as a integer type.

@alexpacini
Copy link

Is it like #27 ?

@jfosorio
Copy link
Author

jfosorio commented Feb 26, 2020

Yes, I think is the same but the solution is slightly different.
Here I do it while creating the matrix:
d_mat = np.ones((len_x, len_y, 2), dtype=np.int)
#27 do it just before the information is used in:
for xs in np.linspace(x0, x1, int(x_div + 1))[1:]:

@afiskon
Copy link

afiskon commented Apr 6, 2020

I can confirm that this patch fixes the compatibility issue with numpy > 1.16. Hope to see it in the upstream!

@DocEpsilon
Copy link

DocEpsilon commented Mar 27, 2021

This one-line fix is an open issue for a year now. Maybe add some contributors? :-)
A lot of people forked obviously because of this.

@afiskon
Copy link

afiskon commented Nov 23, 2021

@vMeijin this is a major issue since numpy==1.6 can't be compiled on some modern systems anymore with recent Python versions (I'm using MacOS). Could you please just press the "Merge" button? :)

@SaladePengouin
Copy link

@rpcope1 maybe could merge it? Thanks.

@rpcope1
Copy link
Contributor

rpcope1 commented May 6, 2022

@SaladePengouin I wish I could, I don't have the ability to merge. I haven't thought about library for almost a decade now, but this sounds like a real challenge. I don't know if there's a preferred fork or something, otherwise I might be able to take a stab at it.

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

Successfully merging this pull request may close these issues.

None yet

6 participants