jzaremba / guiqwt

Automatically exported from code.google.com/p/guiqwt
Other
0 stars 1 forks source link

RuntimeError: Failed to make contiguous array of PyArray_DOUBLE #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

What steps will reproduce the problem?
1. from terminal: ipython testplot.py

What is the expected output? What do you see instead?
expected output should be comparable to running testplot.py with importing 
matplotlib instead of guiqwt. the output is a plot of the 10 data points

after running testplot.py:
RuntimeError                              Traceback (most recent call last)
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/pyth
on2.7/site-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
    176             else:
    177                 filename = fname
--> 178             __builtin__.execfile(filename, *where)

/Users/Jonah/programs/testplot.py in <module>()
      8 ydata = [23,34,45,56,44,37,23,18,12,6]
      9 
---> 10 plt.plot(xdata,ydata)
     11 plt.show()

/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/pyth
on2.7/site-packages/guiqwt/pyplot.pyc in plot(*args, **kwargs)
    474     """
    475     axe = gca()
--> 476     curves = make.mcurve(*args, **kwargs)
    477     if not isinstance(curves, list):
    478         curves = [curves]

/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/pyth
on2.7/site-packages/guiqwt/builder.pyc in mcurve(self, *args, **kwargs)
    307                 param.label = make_title(basename, CURVE_COUNT)
    308             update_style_attr(stylei, param)
--> 309             curves.append(self.pcurve(x, yi, param, **kwargs))
    310         if len(curves) == 1:
    311             return curves[0]

/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/pyth
on2.7/site-packages/guiqwt/builder.pyc in pcurve(self, x, y, param, xaxis, 
yaxis)
    322         """
    323         curve = CurveItem(param)
--> 324         curve.set_data(x, y)
    325         curve.update_params()
    326         self.__set_curve_axes(curve, xaxis, yaxis)

/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/pyth
on2.7/site-packages/guiqwt/curve.pyc in set_data(self, x, y)
    449         self._x = np.array(x, copy=False)
    450         self._y = np.array(y, copy=False)
--> 451         self.setData(self._x, self._y)
    452 
    453     def is_empty(self):

RuntimeError: Failed to make contiguous array of PyArray_DOUBLE

What version of the product are you using? On what operating system?
OS X 10.8
guiqwt: 2.1.6
gt: 4.8.2
qwt: 6.0.1
python: 2.7.3
pyqwt: 5.2.0
pyqt 4.9.4

Please provide any additional information below.
error only occurs when using guiqwt.pyplot as the graphing engine but not when 
using matplotlib

Original issue reported on code.google.com by eatonjo...@gmail.com on 8 Aug 2012 at 5:51

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was updated by revision b8867d3c2f27.

Original comment by pierre.raybaut on 7 Nov 2012 at 4:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm getting the same error despite the update. My code work fine with 
matplotlib...

Traceback (most recent call last):
  File "C:/Users/Avell/Documents/Programacao/Phyton/Ca-Trasient/PyCalcium - guipwt.py", line 118, in transformData
    plt.plot(self.time, self.Tdata)            
  File "C:\Python27\lib\site-packages\guiqwt\pyplot.py", line 484, in plot
    curves = make.mcurve(*args, **kwargs)
  File "C:\Python27\lib\site-packages\guiqwt\builder.py", line 316, in mcurve
    curves.append(self.pcurve(x, yi, param, **kwargs))
  File "C:\Python27\lib\site-packages\guiqwt\builder.py", line 331, in pcurve
    curve.set_data(x, y)
  File "C:\Python27\lib\site-packages\guiqwt\curve.py", line 469, in set_data
    self.setData(self._x, self._y)
RuntimeError: Failed to make contiguous array of PyArray_DOUBLE

Python(x,y) 2.7: Python 2.7.6, NumPy 1.8.0, SciPy 0.13.3, Matplotlib 1.3.1
+ guidata 1.6.1, guiqwt 2.3.1

Original comment by humberto...@gmail.com on 14 Apr 2014 at 9:08

Attachments:

GoogleCodeExporter commented 9 years ago
I forgot the file with data.

Original comment by humberto...@gmail.com on 15 Apr 2014 at 11:52

Attachments: