Public bug reported:

Binary package hint: python-matplotlib

This bug is also reported on the matplotlib sourceforge site, because I'm not 
sure if it's their
problem (i.e. code that is not 64-bit clean) or a packaging problem (i.e. some 
improper mix
of 32 and 64 bit code).   Sorry for the duplication.   Sourceforge bug ID: 
2243945.


stars:~$ lsb_release -rd
Description:    Ubuntu 8.10
Release:        8.10
stars:~$ 

stars:src$ apt-cache policy python-matplotlib
python-matplotlib:
  Installed: 0.98.3-4ubuntu1
  Candidate: 0.98.3-4ubuntu1
  Version table:
 *** 0.98.3-4ubuntu1 0
        500 http://gb.archive.ubuntu.com intrepid/universe Packages
        100 /var/lib/dpkg/status
stars:src$ 


When I run on a Ubuntu 8.10 system on an AMD-64 processor, I get an
exception:

Traceback (most recent call last):
File
"/usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py", line
333, in expose_event
self._render_figure(self._pixmap, w, h)
File
"/usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py", line
321, in _render_figure
self.figure.draw (self._renderer)
File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 759,
in draw
for a in self.axes: a.draw(renderer)
File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 1465, in
draw
im.draw(renderer)
File "/usr/lib/python2.5/site-packages/matplotlib/image.py", line 239, in
draw
*self.get_transformed_clip_path_and_affine())
File
"/usr/lib/python2.5/site-packages/matplotlib/backends/backend_gdk.py", line
119, in draw_image
array[:,:,:] = image_array
ValueError: shape mismatch: objects cannot be broadcast to a single shape


If I go into the backend_gdk.py code and add a print statement on the
relevant sizes
array = pixbuf_get_pixels_array(pixbuf)
print 'arrayshape=', array.shape, 'image_array.shape=',
image_array.shape, rows, cols
array[:,:,:] = image_array
I find that
arrayshape= (372, 0, 497) image_array.shape= (372, 497, 4) 372 497

The zero in the middle is particularly odd. This array is generated by
_backend_gdk.c in the vicinity of line 46, and the code looks fine,
but I'll bet dollars to doughnuts that it's a 32bit/64-bit problem.
The "dims" array is presumably 64-bit integers, and
PyArray_FromDimsAndData probably expects dims to be 32-bit integers.
As a result, it'd treat the high 32-bits of the first dimension as a
dimension in its own right (giving the zero), and put the low 32 bits
of the second dimension in the third slot.

Is this a Ubuntu packaging problem (somehow mixing 32 and 64 bit libraries)
or
is it a matplotlib problem?

** Affects: matplotlib (Ubuntu)
     Importance: Undecided
         Status: New

-- 
python-matplotlib: Exception when drawing image on 64-bit system
https://bugs.launchpad.net/bugs/295719
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to