yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #06655
[Branch ~yade-dev/yade/trunk] Rev 2634: 1. Fix i386 (?) live plot issue
------------------------------------------------------------
revno: 2634
committer: Václav Šmilauer <eu@xxxxxxxx>
branch nick: yade
timestamp: Sun 2011-01-02 12:25:20 +0100
message:
1. Fix i386 (?) live plot issue
modified:
py/plot.py
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'py/plot.py'
--- py/plot.py 2011-01-02 10:43:22 +0000
+++ py/plot.py 2011-01-02 11:25:20 +0000
@@ -139,8 +139,10 @@
x,y=[self.xdata[current]],[self.ydata[current]]
except IndexError: x,y=0,0
# this could be written in a nicer way, very likely
- pt=numpy.ndarray((2,),buffer=numpy.array([x,y]))
- if self.scatter: self.scatter.set_offsets(pt)
+ try:
+ pt=numpy.ndarray((2,),buffer=numpy.array([x,y]))
+ if self.scatter: self.scatter.set_offsets(pt)
+ except TypeError: pass # this happens at i386 with empty data, saying TypeError: buffer is too small for requested array
currLineRefs=[]
liveTimeStamp=0 # timestamp when live update was started, so that the old thread knows to stop if that changes