Open jfosorio opened 4 years ago
Is it like #27 ?
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)
for xs in np.linspace(x0, x1, int(x_div + 1))[1:]:
I can confirm that this patch fixes the compatibility issue with numpy > 1.16. Hope to see it in the upstream!
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.
@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? :)
@rpcope1 maybe could merge it? Thanks.
@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.
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.