By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,547 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,547 IT Pros & Developers. It's quick & easy.


P: n/a

I have no idea, how to properly declare/use Numeric functions in pyrex.
For example the code below causes segmentation fault:

--in pyrex--------------
[... some lines from Pyrex-0.9/Demos/numeric_demo.pyx, plus: ]

cdef extern from "Numeric/arrayobject.h":

object PyArray_ContiguousFromObject ( object, int, int, int )

def contiguous_tst ( ArrayType A ) :

if A.nd != 1 :
raise ValueError("1D array expected.")

B = PyArray_ContiguousFromObject(<object>A,A.descr.typ e,1,1)

print '***'

return B
--in python--------------
from Numeric import *
A = array((1,2,3,4,5))

My environment is 'quite new': python 2.3.3, Numeric 23.1, pyrex 0.9.

I hope you will give me some light on this problem, please.

Best regards
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.