[Numpy-discussion] [ANN] numpy 1.4.0 rc2

Gökhan Sever gokhansever@gmail....
Mon Dec 28 15:30:01 CST 2009

On Mon, Dec 28, 2009 at 12:15 PM, Gökhan Sever <gokhansever@gmail.com>wrote:

> On Mon, Dec 28, 2009 at 11:16 AM, Gökhan Sever <gokhansever@gmail.com>wrote:
>> On Mon, Dec 28, 2009 at 11:07 AM, Robert Kern <robert.kern@gmail.com>wrote:
>>> On Mon, Dec 28, 2009 at 11:00, Gökhan Sever <gokhansever@gmail.com>
>>> wrote:
>>> > One interesting thing I have noticed while installing the numpy from
>>> the
>>> > source is that numpy dependent libraries must be re-installed and this
>>> must
>>> > be a clean re-install. For instance I can't import some matplotlib and
>>> scipy
>>> > modules without making a fresh installation for these packages. My
>>> attempts
>>> > result with a runtime error.
>>> Please, please, always copy-and-paste the traceback when reporting an
>>> error. I know you aren't formally reporting a bug here, but it always
>>> helps.
>>> > Could someone clarify this point? Is this due
>>> > to API change in the numpy core?
>>> Cython/Pyrex code does a runtime check on the struct sizes of types.
>>> We have carefully added a member to the PyArrayDescr struct; i.e. it
>>> shouldn't cause any actual problems, but Cython does the check
>>> anyways. This affects a few modules in scipy, but shouldn't have
>>> affected anything in matplotlib. The traceback may help us identify
>>> the issue you are seeing.
>> It is too late for the tracebacks. I have already removed the problematic
>> packages and did clean installs. However, next time I will be more careful
>> while reporting such issues. If it helps, in both matplotlib (via ipython
>> -pylab) and scipy.stats import cases the runtime errors was raised due to
>> numpy.core.multiarray module import.
>>> --
>>> Robert Kern
>>> "I have come to believe that the whole world is an enigma, a harmless
>>> enigma that is made terrible by our own mad attempt to interpret it as
>>> though it had an underlying truth."
>>>  -- Umberto Eco
>>> _______________________________________________
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion@scipy.org
>>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>> --
>> Gökhan
> Here is another interesting point to consider. To reproduce the runtime
> error I mentioned previously I downgraded numpy (from the latest check-out
> installation) following these steps:
> svn co http://svn.scipy.org/svn/numpy/branches/1.3.x/ numpy
> cd numpy
> python setup.py install
> Writing /usr/lib/python2.6/site-packages/numpy-1.3.1.dev8031-py2.6.egg-info
> I[2]: import matplotlib.pyplot as plt
> Segmentation fault
> I[3]: from scipy import stats
> Segmentation fault
> I have installed matplotlib and scipy using the latest numpy dev version. A
> little later I will downgrade matplotlib and scipy to their previous stable
> versions, and compile them using numpy 1.3.x. Afterwards I will update numpy
> and test to see if I can re-produce the runtime error to provide the
> tracebacks. First let me know if any tracebacks needed for these segfaults
> or are these known failures?
> ================================================================================
> Platform     :
> Linux-
> Python       : ('CPython', 'tags/r26', '66714')
> ================================================================================
> --
> Gökhan

Since no one has replied, I tried to reproduce the runtime error but ended
up with different errors. Read more for the details:

svn co http://svn.scipy.org/svn/scipy/tags/0.7.1/ scipy
python setup.py install
Writing /usr/lib/python2.6/site-packages/scipy-0.7.1-py2.6.egg-info

svn co
python setup.py install
Writing /usr/lib/python2.6/site-packages/matplotlib-0.99.0-py2.6.egg-info

install them using

>>> import numpy
>>> numpy.__version__

scipy import is fine but matplotlib fails with a different import error. I
wonder if the buildbots test the source and releases for against different
numpy versions or it is just might system acting weird.

>>> from scipy import stats

>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
"/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/pyplot.py", line
6, in <module>
    from matplotlib.figure import Figure, figaspect
"/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/figure.py", line
17, in <module>
    import artist
"/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.py", line
5, in <module>
    from transforms import Bbox, IdentityTransform, TransformedBbox,
line 34, in <module>
    from matplotlib._path import affine_transform
ImportError: No module named _path

Anyways, back to the main point. First remove the numpy 1.3.x:

[root@ccn site-packages]# rm -rf numpy
[root@ccn site-packages]# rm -rf numpy-1.3.1.dev8031-py2.6.egg-info

and install from the latest trunk:

svn co http://svn.scipy.org/svn/numpy/trunk numpy
python setup.py install
Writing /usr/lib/python2.6/site-packages/numpy-1.5.0.dev8032-py2.6.egg-info

This time scipy asserts:

>>> from scipy import stats
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/scipy/stats/__init__.py", line 7,
in <module>
    from stats import *
  File "/usr/lib/python2.6/site-packages/scipy/stats/stats.py", line 203, in
    from morestats import find_repeats #is only reference to scipy.stats
  File "/usr/lib/python2.6/site-packages/scipy/stats/morestats.py", line 7,
in <module>
    import distributions
  File "/usr/lib/python2.6/site-packages/scipy/stats/distributions.py", line
27, in <module>
    import vonmises_cython
  File "numpy.pxd", line 30, in scipy.stats.vonmises_cython
ValueError: numpy.dtype does not appear to be the correct type object

import matplotlib.pyplot as plt yields same as previous import attempt. I
must have caught an old issue.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091228/b31c367f/attachment.html 

More information about the NumPy-Discussion mailing list