Carlos Pascual
2011-06-10 07:37:10 UTC
Hi,
I just found a bug in the set_xy method of XYImageItem class (in image.py of
guiqwt 2.1.3).
I mark it in the following code snippet from image.py:
++++++++++++++++++++++++++++++++++++++++
class XYImageItem(RawImageItem):
(...)
def set_xy(self, x, y):
(...)
if y.shape[0] == ni:
self.y = to_bins(y)
elif x.shape[0] == ni+1: #<<<<<<<< THIS SHOULD BE: y.shape[0] !!!
self.y = y
else:
raise IndexError("y must be a 1D array of length %d or %d" \
% (ni, ni+1))
++++++++++++++++++++++++++++++++++++++++
I hope this helps.
Carlos
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
Cells / Alba Synchrotron [http:/www.cells.es]
Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpascual-***@public.gmane.org
Phone: +34 93 592 4428
+----------------------------------------------------+
I just found a bug in the set_xy method of XYImageItem class (in image.py of
guiqwt 2.1.3).
I mark it in the following code snippet from image.py:
++++++++++++++++++++++++++++++++++++++++
class XYImageItem(RawImageItem):
(...)
def set_xy(self, x, y):
(...)
if y.shape[0] == ni:
self.y = to_bins(y)
elif x.shape[0] == ni+1: #<<<<<<<< THIS SHOULD BE: y.shape[0] !!!
self.y = y
else:
raise IndexError("y must be a 1D array of length %d or %d" \
% (ni, ni+1))
++++++++++++++++++++++++++++++++++++++++
I hope this helps.
Carlos
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
Cells / Alba Synchrotron [http:/www.cells.es]
Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpascual-***@public.gmane.org
Phone: +34 93 592 4428
+----------------------------------------------------+