...
cdef short[ ::1,:,:] mya= <short[:128 , :128, :14]> self._thisptr.getBufferPtr() #this is the short pointer
z=np.asarray(mya)
return z
...
Error:
Probably there is some better solution, but a silly/simple hack would be to exploit the fact that if some memory buffer is an f-contiguous representation of an array A, then it is also a c-contiguous representation of the array A-transpose. So you could take a C contiguous view with your shape reversed, and then return resulting_array.T
(The .T attribute on numpy arrays never makes a copy, because it can exploit the above trick internally.)
-n
--
---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to a topic in the Google Groups "cython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cython-users/A7tUKycLZfM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cython-users...@googlegroups.com.