serge-sans-paille / pythran

Ahead of Time compiler for numeric kernels
https://pythran.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.99k stars 191 forks source link

Invalid call to pythranized function `test(float64[:] (reshaped)) for negative strides #1178

Open jeanlaroche opened 5 years ago

jeanlaroche commented 5 years ago

When compiling this simple function:

import numpy as np

#pythran export test(float[] or float[::])
def test(x):
    return x*2

I get an error when calling it with:

A=np.ones(10,dtype=float)
test(A[-1::-1]) #<- error: Invalid call to pythranized function `test(float64[:] (reshaped))'
test(A[0::2])   # works
jeanlaroche commented 5 years ago

BTW this seems similar to #1049 which was just closed...

jeanlaroche commented 2 years ago

Note: this still does not work with the latest pythran on master. 80e7bbcb0