Use positional argument name for np.reshape: newshape. #3043
Conversation
Numpy 2.1 changed variable name to shape. In Numpy 2.4 newshape is definitely removed
Required for newshape name change to shape in np.reshape Possibly later versions also allowed
|
It is possible that a higher version than Numpy 2.2 is allowed, but I do not know how to check for it. |
|
I'd suggest simply using the argument positionally as: np.reshape(temp, [len(edges), 2], order="F")That way it will work regardless of the NumPy version. |
As suggested by @gerlero
Due to positional reshape argument no version constraint necessary
|
Thanks @gerlero that is indeed a cleaner solution. I changed the proposal to follow your suggestion. |
|
Does anyone know why github only ran 2 checks, and none of the tests? It is not showing me an option to 'allow tests' or anything. Must be a setting somewhere? |
|
Although, since only one line was changed, I'd say it might be safe to skip the tests. |
|
Interestingly, the tests did run, as they are visible in the Actions tab, but the results are just not being reported in this thread. It seems one of the example runs did not pass. I will fix that before merging into release. |
in Numpy 2.1 the variable is changed from newshape into shape and from Numpy 2.4 the variable newshape is expired.
#api
#3042