Sebastian Schaetz
未讀,2011年10月26日 中午12:35:192011/10/26登入以回覆作者
登入以轉寄訊息
你的權限不足,無法在這個群組刪除訊息
登入以檢舉訊息
該群組的電子郵件地址為匿名,或你需要檢視成員電子郵件地址的權限才能查看原始貼文
收件者:glumpy-users
Hi,
I'm using glumpy as a tool to easily visualize 2d numpy data
interactively from the ipython. My problem is that ipython is not
responsive as long as the glumpy window is open and (more importantly)
that ipython exits after I close the window. I'm on Ubuntu 11.10 x64
and I tried both with ipython 0.11 and the default 0.10.2.
This is the code I use
def showm(data, dim):
# expect 3 dimensional x, y and frame
print data.shape
x = data.shape[0]
y = data.shape[1]
fig = glumpy.figure(size=(x, y))
frame = fig.add_frame(aspect=1)
image = glumpy.image.Image(abs(data[:, :, dim]))
@fig.event
def on_draw():
fig.clear()
frame.draw(x=frame.x, y=frame.y )
image.draw(x=frame.x, y=frame.y, z=0,
width=frame.width, height=frame.height )
fig.show()
and I run it like so from ipython
showm(a,5)
What am I doing wrong?
Thans in advance,
Sebastian