[Numpy-tickets] [NumPy] #219: NameError: PyArray_ContiguousFromObject on FC3; affects mtrand

NumPy numpy-tickets at scipy.net
Tue Aug 1 12:39:35 CDT 2006

#219: NameError: PyArray_ContiguousFromObject on FC3; affects mtrand
 Reporter:  TomLoredo  |       Owner:  somebody
     Type:  defect     |      Status:  new     
 Priority:  normal     |   Milestone:          
Component:  Other      |     Version:          
 Severity:  normal     |    Keywords:          
 C code that calls PyArray_ContiguousFromObject (both my own and within
 compiles fine but gives a NameError at runtime on Fedora Core 3 (Python
 Calling random.set_state displays the bug.  If I edit mtrand.pyx to change
 its 3 PyArray_ContiguousFromObject calls to PyArray_ContiguousFromAny, run
 generate_mtrand_c.py, and reinstall, the error goes away.  A sample
 session is copied below.

 I deleted my previous numpy package from site-packages before installing
 this one.

 I do not have this problem on OS X (10.3.9, MacPy 2.4.1).

 I am unclear of the status of PyArray_ContiguousFromObject.  It is no
 mentioned in the Guide To Numpy.  Is it deprecated?

 -Tom Loredo

 In [1]: import numpy
 In [2]: numpy.__version__
 Out[2]: '1.0b2.dev2941'
 In [3]: from numpy import random
 In [4]: s=random.get_state()
 In [5]: s
  array([-1367602364,   599621924,  1947610538,  -686169956, -1451278673,
         1648572372, -1175619180,  -205273143,    13145610,  1292301198,
         -716751809,   622130452,   123887232, -2052494269]),
 In [6]: random.set_state(s)
 exceptions.NameError                                 Traceback (most
 recent call last)

 /home/loredo/research/exoplanets/rv/<ipython console>

 /home/loredo/research/exoplanets/rv/mtrand.pyx in
 NameError: PyArray_ContiguousFromObject

Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/219>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list