You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When plotting a facevariable, one obtains the error:
Traceback (most recent call last):
File "stratifiedmassflow.py", line 134, in
viewervel.plot()
File "/usr/lib/python2.6/dist-packages/FiPy-2.1-py2.6.egg/fipy/viewers/gnuplotViewer/gnuplotViewer.py", line 99, in plot
self._plot()
File "/usr/lib/python2.6/dist-packages/FiPy-2.1-py2.6.egg/fipy/viewers/gnuplotViewer/gnuplot1DViewer.py", line 83, in plot
with='lines'),)
File "/usr/lib/python2.6/dist-packages/Gnuplot/PlotItems.py", line 560, in Data
data = utils.float_array(data)
File "/usr/lib/python2.6/dist-packages/Gnuplot/utils.py", line 33, in float_array
return numpy.asarray(m, numpy.float32)
File "/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 230, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.
Imported from trac ticket #302, created by benny.malengier@gmail.com on 07-14-2010 at 12:15, last modified: 05-09-2011 at 16:53
The text was updated successfully, but these errors were encountered:
In the patch in attachment, the exception determines the use of cell or face centers. Probably there is a way in fipy to query what type of variable it is, if so, fix can be better ...
I now encountered the same problem with 2D gnuplot viewing.
New patch faceplot_improved.patch uses the class to determine what to do, and works for 1D and 2D Facevariable plots.
When plotting a facevariable, one obtains the error:
Traceback (most recent call last):
File "stratifiedmassflow.py", line 134, in
viewervel.plot()
File "/usr/lib/python2.6/dist-packages/FiPy-2.1-py2.6.egg/fipy/viewers/gnuplotViewer/gnuplotViewer.py", line 99, in plot
self._plot()
File "/usr/lib/python2.6/dist-packages/FiPy-2.1-py2.6.egg/fipy/viewers/gnuplotViewer/gnuplot1DViewer.py", line 83, in plot
with='lines'),)
File "/usr/lib/python2.6/dist-packages/Gnuplot/PlotItems.py", line 560, in Data
data = utils.float_array(data)
File "/usr/lib/python2.6/dist-packages/Gnuplot/utils.py", line 33, in float_array
return numpy.asarray(m, numpy.float32)
File "/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 230, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.
Imported from trac ticket #302, created by benny.malengier@gmail.com on 07-14-2010 at 12:15, last modified: 05-09-2011 at 16:53
The text was updated successfully, but these errors were encountered: