Skip to main content

ipython + matplotlib crashing

I've been having this problem ever since I changed to 1.0.1. It's not clear if it is ipython's fault or matplotlib's fault.

Today I got the first error message before segfault:

objc[56139]: FREED(id): message removeFromSuperviewWithoutNeedingDisplay sent to freed object=0x19b37470

And Mac OS X error report:

Date/Time:       2011-07-15 21:47:54.500 -0400
OS Version:      Mac OS X 10.5.8 (9L30)
Report Version:  6
Anonymous UUID:  655916BF-D521-48C5-B8A3-FBC5E5FA6683

Exception Type:  EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Crashed Thread:  0

Application Specific Information:
objc[56139]: FREED(id): message removeFromSuperviewWithoutNeedingDisplay sent to freed object=0x19b37470

Thread 0 Crashed:
0   libobjc.A.dylib                0x90595bfa _objc_error + 116
1   libobjc.A.dylib                0x90595c30 __objc_error + 52
2   libobjc.A.dylib                0x90594637 _freedHandler + 58
3   com.apple.CoreFoundation       0x93faa676 CFArrayApplyFunction + 198
4   com.apple.AppKit               0x91a0aadc -[NSView _finalizeWithReferenceCounting] + 712
5   com.apple.AppKit               0x91a0a7e8 -[NSView dealloc] + 46
6   com.apple.Foundation           0x9524e68f NSPopAutoreleasePool + 1007
7   _macosx.so                     0x02932580 wait_for_stdin + 561 (_macosx.m:171)
8   readline.so                    0x0133bac0 call_readline + 432
9   org.python.python              0x001e04de PyOS_Readline + 254
10  org.python.python              0x0028dbfc builtin_raw_input + 412
11  org.python.python              0x00296165 PyEval_EvalFrameEx + 19429
12  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
13  org.python.python              0x0029634c PyEval_EvalFrameEx + 19916
14  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
15  org.python.python              0x0029634c PyEval_EvalFrameEx + 19916
16  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
17  org.python.python              0x0029634c PyEval_EvalFrameEx + 19916
18  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
19  org.python.python              0x0029634c PyEval_EvalFrameEx + 19916
20  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
21  org.python.python              0x0029634c PyEval_EvalFrameEx + 19916
22  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
23  org.python.python              0x002983f7 PyEval_EvalCode + 87
24  org.python.python              0x002bcf08 PyRun_FileExFlags + 168
25  org.python.python              0x002bddf3 PyRun_SimpleFileExFlags + 867
26  org.python.python              0x002cf902 Py_Main + 3122
27  org.python.python              0x00001f82 0x1000 + 3970
28  org.python.python              0x00001ea9 0x1000 + 3753

Comments

Popular posts from this blog

Flowing text in inkscape (Poster making)

You can flow text into arbitrary shapes in inkscape. (From a hint here).

You simply create a text box, type your text into it, create a frame with some drawing tool, select both the text box and the frame (click and shift) and then go to text->flow into frame.

UPDATE:

The omnipresent anonymous asked:
Trying to enter sentence so that text forms the number three...any ideas?
The solution:
Type '3' using the text toolConvert to path using object->pathSize as necessaryRemove fillUngroupType in actual text in new text boxSelect the text and the '3' pathFlow the text

Drawing circles using matplotlib

Use the pylab.Circle command

import pylab #Imports matplotlib and a host of other useful modules cir1 = pylab.Circle((0,0), radius=0.75, fc='y') #Creates a patch that looks like a circle (fc= face color) cir2 = pylab.Circle((.5,.5), radius=0.25, alpha =.2, fc='b') #Repeat (alpha=.2 means make it very translucent) ax = pylab.axes(aspect=1) #Creates empty axes (aspect=1 means scale things so that circles look like circles) ax.add_patch(cir1) #Grab the current axes, add the patch to it ax.add_patch(cir2) #Repeat pylab.show()

Pandas panel = collection of tables/data frames aligned by index and column

Pandas panel provides a nice way to collect related data frames together while maintaining correspondence between the index and column values:


import pandas as pd, pylab #Full dimensions of a slice of our panel index = ['1','2','3','4'] #major_index columns = ['a','b','c'] #minor_index df = pd.DataFrame(pylab.randn(4,3),columns=columns,index=index) #A full slice of the panel df2 = pd.DataFrame(pylab.randn(3,2),columns=['a','c'],index=['1','3','4']) #A partial slice df3 = pd.DataFrame(pylab.randn(2,2),columns=['a','b'],index=['2','4']) #Another partial slice df4 = pd.DataFrame(pylab.randn(2,2),columns=['d','e'],index=['5','6']) #Partial slice with a new column and index pn = pd.Panel({'A': df}) pn['B'] = df2 pn['C'] = df3 pn['D'] = df4 for key in pn.items: print pn[key] -> output …