{ "metadata": { "name": "", "signature": "sha256:15a104c64c3b5c0dc4537181fe258b79b781e7ef13a4a53e47c2d7aad003af5e" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "from IPython.core.display import Image\n", "Image(url='http://labrosa.ee.columbia.edu/crucialpython/logo.png', width=600)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "" ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "" ] } ], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": {}, "source": [ "One very good feature of MATLAB is that it is very easy for debugging, which is one of the main reason that many people still use MATLAB. Since correcting bugs is so important in coding, today we are going to share some python feature for debugging. " ] }, { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Debug in python" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Some quick commands" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Assume we have a very simple piece of code" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import numpy as np\n", "X = 1\n", "Y = 'c'\n", "Z = X+Y\n", "A = 3\n", "B = 4" ], "language": "python", "metadata": {}, "outputs": [ { "ename": "TypeError", "evalue": "unsupported operand type(s) for +: 'int' and 'str'", "output_type": "pyerr", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mX\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mY\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'c'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0mZ\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mX\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0mY\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0mA\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m3\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0mB\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m4\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mTypeError\u001b[0m: unsupported operand type(s) for +: 'int' and 'str'" ] } ], "prompt_number": 2 }, { "cell_type": "markdown", "metadata": {}, "source": [ "display variables" ] }, { "cell_type": "code", "collapsed": false, "input": [ "whos" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Variable Type Data/Info\n", "----------------------------\n", "Image type \n", "X int 1\n", "Y str c\n" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "locals()" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stderr", "text": [ "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py:710: UserWarning: savefig.extension is deprecated and replaced with savefig.format; please use the latter.\n", " warnings.warn(self.msg_depr % (key, alt))\n", "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py:710: UserWarning: svg.embed_char_paths is deprecated and replaced with svg.fonttype; please use the latter.\n", " warnings.warn(self.msg_depr % (key, alt))\n" ] }, { "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "{'ALLOW_THREADS': 1,\n", " 'Annotation': matplotlib.text.Annotation,\n", " 'Arrow': matplotlib.patches.Arrow,\n", " 'Artist': matplotlib.artist.Artist,\n", " 'AutoLocator': matplotlib.ticker.AutoLocator,\n", " 'Axes': matplotlib.axes.Axes,\n", " 'BUFSIZE': 8192,\n", " 'Button': matplotlib.widgets.Button,\n", " 'CLIP': 0,\n", " 'Circle': matplotlib.patches.Circle,\n", " 'ComplexWarning': numpy.core.numeric.ComplexWarning,\n", " 'DAILY': 3,\n", " 'DataSource': numpy.lib._datasource.DataSource,\n", " 'DateFormatter': matplotlib.dates.DateFormatter,\n", " 'DateLocator': matplotlib.dates.DateLocator,\n", " 'DayLocator': matplotlib.dates.DayLocator,\n", " 'ERR_CALL': 3,\n", " 'ERR_DEFAULT': 0,\n", " 'ERR_DEFAULT2': 521,\n", " 'ERR_IGNORE': 0,\n", " 'ERR_LOG': 5,\n", " 'ERR_PRINT': 4,\n", " 'ERR_RAISE': 2,\n", " 'ERR_WARN': 1,\n", " 'FLOATING_POINT_SUPPORT': 1,\n", " 'FPE_DIVIDEBYZERO': 1,\n", " 'FPE_INVALID': 8,\n", " 'FPE_OVERFLOW': 2,\n", " 'FPE_UNDERFLOW': 4,\n", " 'FR': FR,\n", " 'False_': False,\n", " 'Figure': matplotlib.figure.Figure,\n", " 'FigureCanvasBase': matplotlib.backend_bases.FigureCanvasBase,\n", " 'FixedFormatter': matplotlib.ticker.FixedFormatter,\n", " 'FixedLocator': matplotlib.ticker.FixedLocator,\n", " 'FormatStrFormatter': matplotlib.ticker.FormatStrFormatter,\n", " 'Formatter': matplotlib.ticker.Formatter,\n", " 'FuncFormatter': matplotlib.ticker.FuncFormatter,\n", " 'GridSpec': matplotlib.gridspec.GridSpec,\n", " 'HOURLY': 4,\n", " 'HourLocator': matplotlib.dates.HourLocator,\n", " 'Image': IPython.core.display.Image,\n", " 'In': ['',\n", " u\"from IPython.core.display import Image\\nImage(url='http://labrosa.ee.columbia.edu/crucialpython/logo.png', width=600)\",\n", " u\"import numpy as np\\nX = 1\\nY = 'c'\\nZ = X+Y\\nA = 3\\nB = 4\",\n", " u\"get_ipython().magic(u'whos ')\",\n", " u'locals()'],\n", " 'IndexDateFormatter': matplotlib.dates.IndexDateFormatter,\n", " 'IndexLocator': matplotlib.ticker.IndexLocator,\n", " 'Inf': inf,\n", " 'Infinity': inf,\n", " 'LinAlgError': numpy.linalg.linalg.LinAlgError,\n", " 'Line2D': matplotlib.lines.Line2D,\n", " 'LinearLocator': matplotlib.ticker.LinearLocator,\n", " 'Locator': matplotlib.ticker.Locator,\n", " 'LogFormatter': matplotlib.ticker.LogFormatter,\n", " 'LogFormatterExponent': matplotlib.ticker.LogFormatterExponent,\n", " 'LogFormatterMathtext': matplotlib.ticker.LogFormatterMathtext,\n", " 'LogLocator': matplotlib.ticker.LogLocator,\n", " 'MAXDIMS': 32,\n", " 'MINUTELY': 5,\n", " 'MO': MO,\n", " 'MONTHLY': 1,\n", " 'MachAr': numpy.core.machar.MachAr,\n", " 'MaxNLocator': matplotlib.ticker.MaxNLocator,\n", " 'MinuteLocator': matplotlib.dates.MinuteLocator,\n", " 'MonthLocator': matplotlib.dates.MonthLocator,\n", " 'MultipleLocator': matplotlib.ticker.MultipleLocator,\n", " 'NAN': nan,\n", " 'NINF': -inf,\n", " 'NZERO': -0.0,\n", " 'NaN': nan,\n", " 'Normalize': matplotlib.colors.Normalize,\n", " 'NullFormatter': matplotlib.ticker.NullFormatter,\n", " 'NullLocator': matplotlib.ticker.NullLocator,\n", " 'Out': {1: },\n", " 'PINF': inf,\n", " 'PZERO': 0.0,\n", " 'PackageLoader': numpy._import_tools.PackageLoader,\n", " 'PolarAxes': matplotlib.projections.polar.PolarAxes,\n", " 'Polygon': matplotlib.patches.Polygon,\n", " 'RAISE': 2,\n", " 'RRuleLocator': matplotlib.dates.RRuleLocator,\n", " 'RankWarning': numpy.lib.polynomial.RankWarning,\n", " 'Rectangle': matplotlib.patches.Rectangle,\n", " 'SA': SA,\n", " 'SECONDLY': 6,\n", " 'SHIFT_DIVIDEBYZERO': 0,\n", " 'SHIFT_INVALID': 9,\n", " 'SHIFT_OVERFLOW': 3,\n", " 'SHIFT_UNDERFLOW': 6,\n", " 'SU': SU,\n", " 'ScalarFormatter': matplotlib.ticker.ScalarFormatter,\n", " 'ScalarType': (int,\n", " float,\n", " complex,\n", " long,\n", " bool,\n", " str,\n", " unicode,\n", " buffer,\n", " numpy.int16,\n", " numpy.uint16,\n", " numpy.unicode_,\n", " numpy.float128,\n", " numpy.datetime64,\n", " numpy.int32,\n", " numpy.uint32,\n", " numpy.void,\n", " numpy.complex64,\n", " numpy.timedelta64,\n", " numpy.int64,\n", " numpy.uint64,\n", " numpy.float16,\n", " numpy.complex128,\n", " numpy.int64,\n", " numpy.uint64,\n", " numpy.float32,\n", " numpy.complex256,\n", " numpy.bool_,\n", " numpy.int8,\n", " numpy.uint8,\n", " numpy.string_,\n", " numpy.float64,\n", " numpy.object_),\n", " 'SecondLocator': matplotlib.dates.SecondLocator,\n", " 'Slider': matplotlib.widgets.Slider,\n", " 'Subplot': matplotlib.axes.AxesSubplot,\n", " 'SubplotTool': matplotlib.widgets.SubplotTool,\n", " 'TH': TH,\n", " 'TU': TU,\n", " 'Tester': numpy.testing.nosetester.NoseTester,\n", " 'Text': matplotlib.text.Text,\n", " 'TickHelper': matplotlib.ticker.TickHelper,\n", " 'True_': True,\n", " 'UFUNC_BUFSIZE_DEFAULT': 8192,\n", " 'UFUNC_PYVALS_NAME': 'UFUNC_PYVALS',\n", " 'WE': WE,\n", " 'WEEKLY': 2,\n", " 'WRAP': 1,\n", " 'WeekdayLocator': matplotlib.dates.WeekdayLocator,\n", " 'Widget': matplotlib.widgets.Widget,\n", " 'X': 1,\n", " 'Y': 'c',\n", " 'YEARLY': 0,\n", " 'YearLocator': matplotlib.dates.YearLocator,\n", " '_': ,\n", " '_1': ,\n", " '__': '',\n", " '___': '',\n", " '__builtin__': ,\n", " '__builtins__': {'ArithmeticError': ArithmeticError,\n", " 'AssertionError': AssertionError,\n", " 'AttributeError': AttributeError,\n", " 'BaseException': BaseException,\n", " 'BufferError': BufferError,\n", " 'BytesWarning': BytesWarning,\n", " 'DeprecationWarning': DeprecationWarning,\n", " 'EOFError': EOFError,\n", " 'Ellipsis': Ellipsis,\n", " 'EnvironmentError': EnvironmentError,\n", " 'Exception': Exception,\n", " 'False': False,\n", " 'FloatingPointError': FloatingPointError,\n", " 'FutureWarning': FutureWarning,\n", " 'GeneratorExit': GeneratorExit,\n", " 'IOError': IOError,\n", " 'ImportError': ImportError,\n", " 'ImportWarning': ImportWarning,\n", " 'IndentationError': IndentationError,\n", " 'IndexError': IndexError,\n", " 'KeyError': KeyError,\n", " 'KeyboardInterrupt': KeyboardInterrupt,\n", " 'LookupError': LookupError,\n", " 'MemoryError': MemoryError,\n", " 'NameError': NameError,\n", " 'None': None,\n", " 'NotImplemented': NotImplemented,\n", " 'NotImplementedError': NotImplementedError,\n", " 'OSError': OSError,\n", " 'OverflowError': OverflowError,\n", " 'PendingDeprecationWarning': PendingDeprecationWarning,\n", " 'ReferenceError': ReferenceError,\n", " 'RuntimeError': RuntimeError,\n", " 'RuntimeWarning': RuntimeWarning,\n", " 'StandardError': StandardError,\n", " 'StopIteration': StopIteration,\n", " 'SyntaxError': SyntaxError,\n", " 'SyntaxWarning': SyntaxWarning,\n", " 'SystemError': SystemError,\n", " 'SystemExit': SystemExit,\n", " 'TabError': TabError,\n", " 'True': True,\n", " 'TypeError': TypeError,\n", " 'UnboundLocalError': UnboundLocalError,\n", " 'UnicodeDecodeError': UnicodeDecodeError,\n", " 'UnicodeEncodeError': UnicodeEncodeError,\n", " 'UnicodeError': UnicodeError,\n", " 'UnicodeTranslateError': UnicodeTranslateError,\n", " 'UnicodeWarning': UnicodeWarning,\n", " 'UserWarning': UserWarning,\n", " 'ValueError': ValueError,\n", " 'Warning': Warning,\n", " 'ZeroDivisionError': ZeroDivisionError,\n", " '__IPYTHON__': True,\n", " '__IPYTHON__active': 'Deprecated, check for __IPYTHON__',\n", " '__debug__': True,\n", " '__doc__': \"Built-in functions, exceptions, and other objects.\\n\\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.\",\n", " '__import__': ,\n", " '__name__': '__builtin__',\n", " '__package__': None,\n", " 'abs': ,\n", " 'all': ,\n", " 'any': ,\n", " 'apply': ,\n", " 'basestring': basestring,\n", " 'bin': ,\n", " 'bool': bool,\n", " 'buffer': buffer,\n", " 'bytearray': bytearray,\n", " 'bytes': str,\n", " 'callable': ,\n", " 'chr': ,\n", " 'classmethod': classmethod,\n", " 'cmp': ,\n", " 'coerce': ,\n", " 'compile': ,\n", " 'complex': complex,\n", " 'copyright': Copyright (c) 2001-2010 Python Software Foundation.\n", " All Rights Reserved.\n", " \n", " Copyright (c) 2000 BeOpen.com.\n", " All Rights Reserved.\n", " \n", " Copyright (c) 1995-2001 Corporation for National Research Initiatives.\n", " All Rights Reserved.\n", " \n", " Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.\n", " All Rights Reserved.,\n", " 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands\n", " for supporting Python development. See www.python.org for more information.,\n", " 'delattr': ,\n", " 'dict': dict,\n", " 'dir': ,\n", " 'divmod': ,\n", " 'dreload': ,\n", " 'enumerate': enumerate,\n", " 'eval': ,\n", " 'execfile': ,\n", " 'file': file,\n", " 'filter': ,\n", " 'float': float,\n", " 'format': ,\n", " 'frozenset': frozenset,\n", " 'get_ipython': >,\n", " 'getattr': ,\n", " 'globals': ,\n", " 'hasattr': ,\n", " 'hash': ,\n", " 'help': Type help() for interactive help, or help(object) for help about object.,\n", " 'hex': ,\n", " 'id': ,\n", " 'input': >,\n", " 'int': int,\n", " 'intern': ,\n", " 'isinstance': ,\n", " 'issubclass': ,\n", " 'iter': ,\n", " 'len': ,\n", " 'license': Type license() to see the full license text,\n", " 'list': list,\n", " 'locals': ,\n", " 'long': long,\n", " 'map': ,\n", " 'max': ,\n", " 'memoryview': memoryview,\n", " 'min': ,\n", " 'next': ,\n", " 'object': object,\n", " 'oct': ,\n", " 'open': ,\n", " 'ord': ,\n", " 'pow': ,\n", " 'print': ,\n", " 'property': property,\n", " 'range': ,\n", " 'raw_input': >,\n", " 'reduce': ,\n", " 'reload': ,\n", " 'repr': ,\n", " 'reversed': reversed,\n", " 'round': ,\n", " 'set': set,\n", " 'setattr': ,\n", " 'slice': slice,\n", " 'sorted': ,\n", " 'staticmethod': staticmethod,\n", " 'str': str,\n", " 'sum': ,\n", " 'super': super,\n", " 'tuple': tuple,\n", " 'type': type,\n", " 'unichr': ,\n", " 'unicode': unicode,\n", " 'vars': ,\n", " 'xrange': xrange,\n", " 'zip': },\n", " '__doc__': 'Automatically created module for IPython interactive environment',\n", " '__name__': '__main__',\n", " '__package__': None,\n", " '__version__': '1.7.1',\n", " '_dh': [u'/Users/zchuochen'],\n", " '_i': u'whos',\n", " '_i1': u\"from IPython.core.display import Image\\nImage(url='http://labrosa.ee.columbia.edu/crucialpython/logo.png', width=600)\",\n", " '_i2': u\"import numpy as np\\nX = 1\\nY = 'c'\\nZ = X+Y\\nA = 3\\nB = 4\",\n", " '_i3': u'whos',\n", " '_i4': u'locals()',\n", " '_ih': ['',\n", " u\"from IPython.core.display import Image\\nImage(url='http://labrosa.ee.columbia.edu/crucialpython/logo.png', width=600)\",\n", " u\"import numpy as np\\nX = 1\\nY = 'c'\\nZ = X+Y\\nA = 3\\nB = 4\",\n", " u\"get_ipython().magic(u'whos ')\",\n", " u'locals()'],\n", " '_ii': u\"import numpy as np\\nX = 1\\nY = 'c'\\nZ = X+Y\\nA = 3\\nB = 4\",\n", " '_iii': u\"from IPython.core.display import Image\\nImage(url='http://labrosa.ee.columbia.edu/crucialpython/logo.png', width=600)\",\n", " '_oh': {1: },\n", " '_sh': ,\n", " 'absolute': ,\n", " 'acorr': ,\n", " 'add': ,\n", " 'add_docstring': ,\n", " 'add_newdoc': ,\n", " 'add_newdoc_ufunc': ,\n", " 'add_newdocs': ,\n", " 'alen': ,\n", " 'all': ,\n", " 'allclose': ,\n", " 'alltrue': ,\n", " 'alterdot': ,\n", " 'amap': ,\n", " 'amax': ,\n", " 'amin': ,\n", " 'angle': ,\n", " 'annotate': ,\n", " 'any': ,\n", " 'append': ,\n", " 'apply_along_axis': ,\n", " 'apply_over_axes': ,\n", " 'arange': ,\n", " 'arccos': ,\n", " 'arccosh': ,\n", " 'arcsin': ,\n", " 'arcsinh': ,\n", " 'arctan': ,\n", " 'arctan2': ,\n", " 'arctanh': ,\n", " 'argmax': ,\n", " 'argmin': ,\n", " 'argsort': ,\n", " 'argwhere': ,\n", " 'around': ,\n", " 'array': ,\n", " 'array2string': ,\n", " 'array_equal': ,\n", " 'array_equiv': ,\n", " 'array_repr': ,\n", " 'array_split': ,\n", " 'array_str': ,\n", " 'arrow': ,\n", " 'asanyarray': ,\n", " 'asarray': ,\n", " 'asarray_chkfinite': ,\n", " 'ascontiguousarray': ,\n", " 'asfarray': ,\n", " 'asfortranarray': ,\n", " 'asmatrix': ,\n", " 'asscalar': ,\n", " 'atleast_1d': ,\n", " 'atleast_2d': ,\n", " 'atleast_3d': ,\n", " 'autoscale': ,\n", " 'autumn': ,\n", " 'average': ,\n", " 'axes': ,\n", " 'axhline': ,\n", " 'axhspan': ,\n", " 'axis': ,\n", " 'axvline': ,\n", " 'axvspan': ,\n", " 'bar': ,\n", " 'barbs': ,\n", " 'barh': ,\n", " 'bartlett': ,\n", " 'base_repr': ,\n", " 'bench': >,\n", " 'beta': ,\n", " 'binary_repr': ,\n", " 'bincount': ,\n", " 'binomial': ,\n", " 'bitwise_and': ,\n", " 'bitwise_not': ,\n", " 'bitwise_or': ,\n", " 'bitwise_xor': ,\n", " 'bivariate_normal': ,\n", " 'blackman': ,\n", " 'bmat': ,\n", " 'bone': ,\n", " 'bool8': numpy.bool_,\n", " 'bool_': numpy.bool_,\n", " 'box': ,\n", " 'boxplot': ,\n", " 'broadcast': numpy.broadcast,\n", " 'broadcast_arrays': ,\n", " 'broken_barh': ,\n", " 'busday_count': ,\n", " 'busday_offset': ,\n", " 'busdaycalendar': numpy.busdaycalendar,\n", " 'byte': numpy.int8,\n", " 'byte_bounds': ,\n", " 'bytes': str,\n", " 'bytes_': numpy.string_,\n", " 'c_': ,\n", " 'can_cast': ,\n", " 'cast': {numpy.bool_: >,\n", " numpy.int8: >,\n", " numpy.int16: >,\n", " numpy.int32: >,\n", " numpy.int64: >,\n", " numpy.int64: >,\n", " numpy.uint8: >,\n", " numpy.uint16: >,\n", " numpy.uint32: >,\n", " numpy.uint64: >,\n", " numpy.uint64: >,\n", " numpy.string_: >,\n", " numpy.unicode_: >,\n", " numpy.void: >,\n", " numpy.float16: >,\n", " numpy.float32: >,\n", " numpy.float64: >,\n", " numpy.float128: >,\n", " numpy.complex64: >,\n", " numpy.complex128: >,\n", " numpy.complex256: >,\n", " numpy.object_: >,\n", " numpy.datetime64: >,\n", " numpy.timedelta64: >},\n", " 'cbook': ,\n", " 'cdouble': numpy.complex128,\n", " 'ceil': ,\n", " 'center_matrix': ,\n", " 'cfloat': numpy.complex128,\n", " 'char': ,\n", " 'character': numpy.character,\n", " 'chararray': numpy.core.defchararray.chararray,\n", " 'chisquare': ,\n", " 'cholesky': ,\n", " 'choose': ,\n", " 'cla': ,\n", " 'clabel': ,\n", " 'clf': ,\n", " 'clim': ,\n", " 'clip': ,\n", " 'clongdouble': numpy.complex256,\n", " 'clongfloat': numpy.complex256,\n", " 'close': ,\n", " 'cm': ,\n", " 'cohere': ,\n", " 'colorbar': ,\n", " 'colormaps': ,\n", " 'colors': ,\n", " 'column_stack': ,\n", " 'common_type': ,\n", " 'compare_chararrays': ,\n", " 'complex128': numpy.complex128,\n", " 'complex256': numpy.complex256,\n", " 'complex64': numpy.complex64,\n", " 'complex_': numpy.complex128,\n", " 'complexfloating': numpy.complexfloating,\n", " 'compress': ,\n", " 'concatenate': ,\n", " 'cond': ,\n", " 'conj': ,\n", " 'conjugate': ,\n", " 'connect': ,\n", " 'contour': ,\n", " 'contourf': ,\n", " 'convolve': ,\n", " 'cool': ,\n", " 'copper': ,\n", " 'copy': ,\n", " 'copysign': ,\n", " 'copyto': ,\n", " 'corrcoef': ,\n", " 'correlate': ,\n", " 'cos': ,\n", " 'cosh': ,\n", " 'count_nonzero': ,\n", " 'cov': ,\n", " 'cross': ,\n", " 'csd': ,\n", " 'csingle': numpy.complex64,\n", " 'csv2rec': ,\n", " 'ctypeslib': ,\n", " 'cumprod': ,\n", " 'cumproduct': ,\n", " 'cumsum': ,\n", " 'date2num': ,\n", " 'datestr2num': ,\n", " 'datetime': ,\n", " 'datetime64': numpy.datetime64,\n", " 'datetime_as_string': ,\n", " 'datetime_data': ,\n", " 'dedent': ,\n", " 'deg2rad': ,\n", " 'degrees': ,\n", " 'delaxes': ,\n", " 'delete': ,\n", " 'demean': ,\n", " 'deprecate': ,\n", " 'deprecate_with_doc': >,\n", " 'det': ,\n", " 'detrend': ,\n", " 'detrend_linear': ,\n", " 'detrend_mean': ,\n", " 'detrend_none': ,\n", " 'diag': ,\n", " 'diag_indices': ,\n", " 'diag_indices_from': ,\n", " 'diagflat': ,\n", " 'diagonal': ,\n", " 'diff': ,\n", " 'digitize': ,\n", " 'disconnect': ,\n", " 'disp': ,\n", " 'display': ,\n", " 'dist': ,\n", " 'dist_point_to_segment': ,\n", " 'distances_along_curve': ,\n", " 'divide': ,\n", " 'docstring': ,\n", " 'dot': ,\n", " 'double': numpy.float64,\n", " 'drange': ,\n", " 'draw': ,\n", " 'draw_if_interactive': ,\n", " 'dsplit': ,\n", " 'dstack': ,\n", " 'dtype': numpy.dtype,\n", " 'e': 2.718281828459045,\n", " 'ediff1d': ,\n", " 'eig': ,\n", " 'eigh': ,\n", " 'eigvals': ,\n", " 'eigvalsh': ,\n", " 'einsum': ,\n", " 'emath': ,\n", " 'empty': ,\n", " 'empty_like': ,\n", " 'entropy': ,\n", " 'epoch2num': ,\n", " 'equal': ,\n", " 'errorbar': ,\n", " 'errstate': numpy.core.numeric.errstate,\n", " 'exception_to_str': ,\n", " 'exit': ,\n", " 'exp': ,\n", " 'exp2': ,\n", " 'exp_safe': ,\n", " 'expand_dims': ,\n", " 'expm1': ,\n", " 'exponential': ,\n", " 'extract': ,\n", " 'eye': ,\n", " 'f': ,\n", " 'fabs': ,\n", " 'fastCopyAndTranspose': ,\n", " 'fft': ,\n", " 'fft2': ,\n", " 'fftfreq': ,\n", " 'fftn': ,\n", " 'fftpack': ,\n", " 'fftpack_lite': ,\n", " 'fftshift': ,\n", " 'fftsurr': ,\n", " 'figaspect': ,\n", " 'figimage': ,\n", " 'figlegend': ,\n", " 'fignum_exists': ,\n", " 'figsize': ,\n", " 'figtext': ,\n", " 'figure': ,\n", " 'fill': ,\n", " 'fill_between': ,\n", " 'fill_betweenx': ,\n", " 'fill_diagonal': ,\n", " 'find': ,\n", " 'find_common_type': ,\n", " 'findobj': ,\n", " 'finfo': numpy.core.getlimits.finfo,\n", " 'fix': ,\n", " 'flag': ,\n", " 'flatiter': numpy.flatiter,\n", " 'flatnonzero': ,\n", " 'flatten': ,\n", " 'flexible': numpy.flexible,\n", " 'fliplr': ,\n", " 'flipud': ,\n", " 'float128': numpy.float128,\n", " 'float16': numpy.float16,\n", " 'float32': numpy.float32,\n", " 'float64': numpy.float64,\n", " 'float_': numpy.float64,\n", " 'floating': numpy.floating,\n", " 'floor': ,\n", " 'floor_divide': ,\n", " 'fmax': ,\n", " 'fmin': ,\n", " 'fmod': ,\n", " 'format_parser': numpy.core.records.format_parser,\n", " 'frange': ,\n", " 'frexp': ,\n", " 'frombuffer': ,\n", " 'fromfile': ,\n", " 'fromfunction': ,\n", " 'fromiter': ,\n", " 'frompyfunc': ,\n", " 'fromregex': ,\n", " 'fromstring': ,\n", " 'fv': ,\n", " 'gamma': ,\n", " 'gca': ,\n", " 'gcf': ,\n", " 'gci': ,\n", " 'generic': numpy.generic,\n", " 'genfromtxt': ,\n", " 'geometric': ,\n", " 'get': ,\n", " 'get_array_wrap': ,\n", " 'get_backend': ,\n", " 'get_cmap': ,\n", " 'get_current_fig_manager': ,\n", " 'get_figlabels': ,\n", " 'get_fignums': ,\n", " 'get_include': ,\n", " 'get_ipython': >,\n", " 'get_numarray_include': ,\n", " 'get_plot_commands': ,\n", " 'get_printoptions': ,\n", " 'get_scale_docs': ,\n", " 'get_scale_names': ,\n", " 'get_sparse_matrix': ,\n", " 'get_state': ,\n", " 'get_xyz_where': ,\n", " 'getbuffer': ,\n", " 'getbufsize': ,\n", " 'geterr': ,\n", " 'geterrcall': ,\n", " 'geterrobj': ,\n", " 'getfigs': ,\n", " 'getp': ,\n", " 'ginput': ,\n", " 'gradient': ,\n", " 'gray': ,\n", " 'greater': ,\n", " 'greater_equal': ,\n", " 'grid': ,\n", " 'griddata': ,\n", " 'gumbel': ,\n", " 'half': numpy.float16,\n", " 'hamming': ,\n", " 'hanning': ,\n", " 'helper': ,\n", " 'hexbin': ,\n", " 'hfft': ,\n", " 'hist': ,\n", " 'hist2d': ,\n", " 'histogram': ,\n", " 'histogram2d': ,\n", " 'histogramdd': ,\n", " 'hlines': ,\n", " 'hold': ,\n", " 'hot': ,\n", " 'hsplit': ,\n", " 'hstack': ,\n", " 'hsv': ,\n", " 'hypergeometric': ,\n", " 'hypot': ,\n", " 'i0': ,\n", " 'identity': ,\n", " 'ifft': ,\n", " 'ifft2': ,\n", " 'ifftn': ,\n", " 'ifftshift': ,\n", " 'ihfft': ,\n", " 'iinfo': numpy.core.getlimits.iinfo,\n", " 'imag': ,\n", " 'imread': ,\n", " 'imsave': ,\n", " 'imshow': ,\n", " 'in1d': ,\n", " 'index_exp': ,\n", " 'indices': ,\n", " 'inexact': numpy.inexact,\n", " 'inf': inf,\n", " 'info': ,\n", " 'infty': inf,\n", " 'inner': ,\n", " 'insert': ,\n", " 'inside_poly': ,\n", " 'int0': numpy.int64,\n", " 'int16': numpy.int16,\n", " 'int32': numpy.int32,\n", " 'int64': numpy.int64,\n", " 'int8': numpy.int8,\n", " 'int_': numpy.int64,\n", " 'int_asbuffer': ,\n", " 'intc': numpy.int32,\n", " 'integer': numpy.integer,\n", " 'interactive': ,\n", " 'interp': ,\n", " 'intersect1d': ,\n", " 'intp': numpy.int64,\n", " 'inv': ,\n", " 'invert': ,\n", " 'ioff': ,\n", " 'ion': ,\n", " 'ipmt': ,\n", " 'irfft': ,\n", " 'irfft2': ,\n", " 'irfftn': ,\n", " 'irr': ,\n", " 'is_busday': ,\n", " 'is_closed_polygon': ,\n", " 'is_numlike': ,\n", " 'is_string_like': ,\n", " 'isclose': ,\n", " 'iscomplex': ,\n", " 'iscomplexobj': ,\n", " 'isfinite': ,\n", " 'isfortran': ,\n", " 'ishold': ,\n", " 'isinf': ,\n", " 'isinteractive': ,\n", " 'isnan': ,\n", " 'isneginf': ,\n", " 'isposinf': ,\n", " 'ispower2': ,\n", " 'isreal': ,\n", " 'isrealobj': ,\n", " 'isscalar': ,\n", " 'issctype': ,\n", " 'issubclass_': ,\n", " 'issubdtype': ,\n", " 'issubsctype': ,\n", " 'isvector': ,\n", " 'iterable': ,\n", " 'ix_': ,\n", " 'jet': ,\n", " 'kaiser': ,\n", " 'kron': ,\n", " 'l1norm': ,\n", " 'l2norm': ,\n", " 'lapack_lite': ,\n", " 'laplace': ,\n", " 'ldexp': ,\n", " 'left_shift': ,\n", " 'legend': ,\n", " 'less': ,\n", " 'less_equal': ,\n", " 'levypdf': ,\n", " 'lexsort': ,\n", " 'liaupunov': ,\n", " 'linalg': ,\n", " 'linspace': ,\n", " 'little_endian': True,\n", " 'load': ,\n", " 'loads': ,\n", " 'loadtxt': ,\n", " 'locator_params': ,\n", " 'log': ,\n", " 'log10': ,\n", " 'log1p': ,\n", " 'log2': ,\n", " 'logaddexp': ,\n", " 'logaddexp2': ,\n", " 'logical_and': ,\n", " 'logical_not': ,\n", " 'logical_or': ,\n", " 'logical_xor': ,\n", " 'logistic': ,\n", " 'loglog': ,\n", " 'lognormal': ,\n", " 'logseries': ,\n", " 'logspace': ,\n", " 'longcomplex': numpy.complex256,\n", " 'longdouble': numpy.float128,\n", " 'longest_contiguous_ones': ,\n", " 'longest_ones': ,\n", " 'longfloat': numpy.float128,\n", " 'longlong': numpy.int64,\n", " 'lookfor': ,\n", " 'lstsq': ,\n", " 'ma': ,\n", " 'mafromtxt': ,\n", " 'margins': ,\n", " 'mask_indices': ,\n", " 'mat': ,\n", " 'math': ,\n", " 'matplotlib': ,\n", " 'matrix': numpy.matrixlib.defmatrix.matrix,\n", " 'matrix_power': ,\n", " 'matrix_rank': ,\n", " 'matshow': ,\n", " 'maximum': ,\n", " 'maximum_sctype': ,\n", " 'may_share_memory': ,\n", " 'mean': ,\n", " 'median': ,\n", " 'memmap': numpy.core.memmap.memmap,\n", " 'meshgrid': ,\n", " 'mgrid': ,\n", " 'min_scalar_type': ,\n", " 'minimum': ,\n", " 'minorticks_off': ,\n", " 'minorticks_on': ,\n", " 'mintypecode': ,\n", " 'mirr': ,\n", " 'mlab': ,\n", " 'mod': ,\n", " 'modf': ,\n", " 'movavg': ,\n", " 'mpl': ,\n", " 'msort': ,\n", " 'multinomial': ,\n", " 'multiply': ,\n", " 'multivariate_normal': ,\n", " 'mx2num': ,\n", " 'nan': nan,\n", " 'nan_to_num': ,\n", " 'nanargmax': ,\n", " 'nanargmin': ,\n", " 'nanmax': ,\n", " 'nanmin': ,\n", " 'nansum': ,\n", " 'nbytes': {numpy.bool_: 1,\n", " numpy.int8: 1,\n", " numpy.int16: 2,\n", " numpy.int32: 4,\n", " numpy.int64: 8,\n", " numpy.int64: 8,\n", " numpy.uint8: 1,\n", " numpy.uint16: 2,\n", " numpy.uint32: 4,\n", " numpy.uint64: 8,\n", " numpy.uint64: 8,\n", " numpy.string_: 0,\n", " numpy.unicode_: 0,\n", " numpy.void: 0,\n", " numpy.float16: 2,\n", " numpy.float32: 4,\n", " numpy.float64: 8,\n", " numpy.float128: 16,\n", " numpy.complex64: 8,\n", " numpy.complex128: 16,\n", " numpy.complex256: 32,\n", " numpy.object_: 8,\n", " numpy.datetime64: 8,\n", " numpy.timedelta64: 8},\n", " 'ndarray': numpy.ndarray,\n", " 'ndenumerate': numpy.lib.index_tricks.ndenumerate,\n", " 'ndfromtxt': ,\n", " 'ndim': ,\n", " 'ndindex': numpy.lib.index_tricks.ndindex,\n", " 'nditer': numpy.nditer,\n", " 'negative': ,\n", " 'negative_binomial': ,\n", " 'nested_iters': ,\n", " 'new_figure_manager': ,\n", " 'newaxis': None,\n", " 'newbuffer': ,\n", " 'nextafter': ,\n", " 'noncentral_chisquare': ,\n", " 'noncentral_f': ,\n", " 'nonzero': ,\n", " 'norm': ,\n", " 'norm_flat': ,\n", " 'normal': ,\n", " 'normalize': matplotlib.colors.Normalize,\n", " 'normpdf': ,\n", " 'not_equal': ,\n", " 'np': ,\n", " 'nper': ,\n", " 'npv': ,\n", " 'num2date': ,\n", " 'num2epoch': ,\n", " 'number': numpy.number,\n", " 'numpy': ,\n", " 'obj2sctype': ,\n", " 'object0': numpy.object_,\n", " 'object_': numpy.object_,\n", " 'ogrid': ,\n", " 'ones': ,\n", " 'ones_like': ,\n", " 'outer': ,\n", " 'over': ,\n", " 'packbits': ,\n", " 'pad': ,\n", " 'pareto': ,\n", " 'path_length': ,\n", " 'pause': ,\n", " 'pcolor': ,\n", " 'pcolormesh': ,\n", " 'percentile': ,\n", " 'permutation': ,\n", " 'pi': 3.141592653589793,\n", " 'pie': ,\n", " 'piecewise': ,\n", " 'pink': ,\n", " 'pinv': ,\n", " 'pkgload': ,\n", " 'place': ,\n", " 'plot': ,\n", " 'plot_date': ,\n", " 'plotfile': ,\n", " 'plotting': ,\n", " 'plt': ,\n", " 'pmt': ,\n", " 'poisson': ,\n", " 'polar': ,\n", " 'poly': ,\n", " 'poly1d': numpy.lib.polynomial.poly1d,\n", " 'poly_below': ,\n", " 'poly_between': ,\n", " 'polyadd': ,\n", " 'polyder': ,\n", " 'polydiv': ,\n", " 'polyfit': ,\n", " 'polyint': ,\n", " 'polymul': ,\n", " 'polysub': ,\n", " 'polyval': ,\n", " 'power': ,\n", " 'ppmt': ,\n", " 'prctile': ,\n", " 'prctile_rank': ,\n", " 'prepca': ,\n", " 'print_function': _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536),\n", " 'prism': ,\n", " 'prod': ,\n", " 'product': ,\n", " 'promote_types': ,\n", " 'psd': ,\n", " 'ptp': ,\n", " 'put': ,\n", " 'putmask': ,\n", " 'pv': ,\n", " 'pylab': ,\n", " 'pylab_setup': ,\n", " 'pyplot': ,\n", " 'qr': ,\n", " 'quit': ,\n", " 'quiver': ,\n", " 'quiverkey': ,\n", " 'r_': ,\n", " 'rad2deg': ,\n", " 'radians': ,\n", " 'rand': ,\n", " 'randint': ,\n", " 'randn': ,\n", " 'random': ,\n", " 'random_integers': ,\n", " 'random_sample': ,\n", " 'ranf': ,\n", " 'rank': ,\n", " 'rate': ,\n", " 'ravel': ,\n", " 'ravel_multi_index': ,\n", " 'rayleigh': ,\n", " 'rc': ,\n", " 'rcParams': {'agg.path.chunksize': 0,\n", " 'animation.bitrate': -1,\n", " 'animation.codec': 'mpeg4',\n", " 'animation.ffmpeg_args': '',\n", " 'animation.ffmpeg_path': 'ffmpeg',\n", " 'animation.frame_format': 'png',\n", " 'animation.mencoder_args': '',\n", " 'animation.mencoder_path': 'mencoder',\n", " 'animation.writer': 'ffmpeg',\n", " 'axes.axisbelow': False,\n", " 'axes.color_cycle': ['b', 'g', 'r', 'c', 'm', 'y', 'k'],\n", " 'axes.edgecolor': 'k',\n", " 'axes.facecolor': 'w',\n", " 'axes.formatter.limits': [-7, 7],\n", " 'axes.formatter.use_locale': False,\n", " 'axes.formatter.use_mathtext': False,\n", " 'axes.grid': False,\n", " 'axes.hold': True,\n", " 'axes.labelcolor': 'k',\n", " 'axes.labelsize': 'medium',\n", " 'axes.labelweight': 'normal',\n", " 'axes.linewidth': 1.0,\n", " 'axes.titlesize': 'large',\n", " 'axes.unicode_minus': True,\n", " 'axes3d.grid': True,\n", " 'backend': 'module://IPython.kernel.zmq.pylab.backend_inline',\n", " 'backend.qt4': 'PyQt4',\n", " 'backend_fallback': True,\n", " 'contour.negative_linestyle': 'dashed',\n", " 'datapath': '/usr/local/lib/python2.7/site-packages/matplotlib/mpl-data',\n", " 'docstring.hardcopy': False,\n", " 'figure.autolayout': False,\n", " 'figure.dpi': 80,\n", " 'figure.edgecolor': (1, 1, 1, 0),\n", " 'figure.facecolor': (1, 1, 1, 0),\n", " 'figure.figsize': (6.0, 4.0),\n", " 'figure.subplot.bottom': 0.125,\n", " 'figure.subplot.hspace': 0.2,\n", " 'figure.subplot.left': 0.125,\n", " 'figure.subplot.right': 0.9,\n", " 'figure.subplot.top': 0.9,\n", " 'figure.subplot.wspace': 0.2,\n", " 'font.cursive': ['Apple Chancery',\n", " 'Textile',\n", " 'Zapf Chancery',\n", " 'Sand',\n", " 'cursive'],\n", " 'font.family': 'sans-serif',\n", " 'font.fantasy': ['Comic Sans MS',\n", " 'Chicago',\n", " 'Charcoal',\n", " 'ImpactWestern',\n", " 'fantasy'],\n", " 'font.monospace': ['Bitstream Vera Sans Mono',\n", " 'DejaVu Sans Mono',\n", " 'Andale Mono',\n", " 'Nimbus Mono L',\n", " 'Courier New',\n", " 'Courier',\n", " 'Fixed',\n", " 'Terminal',\n", " 'monospace'],\n", " 'font.sans-serif': ['Bitstream Vera Sans',\n", " 'DejaVu Sans',\n", " 'Lucida Grande',\n", " 'Verdana',\n", " 'Geneva',\n", " 'Lucid',\n", " 'Arial',\n", " 'Helvetica',\n", " 'Avant Garde',\n", " 'sans-serif'],\n", " 'font.serif': ['Bitstream Vera Serif',\n", " 'DejaVu Serif',\n", " 'New Century Schoolbook',\n", " 'Century Schoolbook L',\n", " 'Utopia',\n", " 'ITC Bookman',\n", " 'Bookman',\n", " 'Nimbus Roman No9 L',\n", " 'Times New Roman',\n", " 'Times',\n", " 'Palatino',\n", " 'Charter',\n", " 'serif'],\n", " 'font.size': 10,\n", " 'font.stretch': 'normal',\n", " 'font.style': 'normal',\n", " 'font.variant': 'normal',\n", " 'font.weight': 'normal',\n", " 'grid.alpha': 1.0,\n", " 'grid.color': 'k',\n", " 'grid.linestyle': ':',\n", " 'grid.linewidth': 0.5,\n", " 'image.aspect': 'equal',\n", " 'image.cmap': 'jet',\n", " 'image.interpolation': 'bilinear',\n", " 'image.lut': 256,\n", " 'image.origin': 'upper',\n", " 'image.resample': False,\n", " 'interactive': True,\n", " 'keymap.all_axes': 'a',\n", " 'keymap.back': ['left', 'c', 'backspace'],\n", " 'keymap.forward': ['right', 'v'],\n", " 'keymap.fullscreen': ('f', 'ctrl+f'),\n", " 'keymap.grid': 'g',\n", " 'keymap.home': ['h', 'r', 'home'],\n", " 'keymap.pan': 'p',\n", " 'keymap.quit': ('ctrl+w',),\n", " 'keymap.save': ('s', 'ctrl+s'),\n", " 'keymap.xscale': ['k', 'L'],\n", " 'keymap.yscale': 'l',\n", " 'keymap.zoom': 'o',\n", " 'legend.borderaxespad': 0.5,\n", " 'legend.borderpad': 0.4,\n", " 'legend.columnspacing': 2.0,\n", " 'legend.fancybox': False,\n", " 'legend.fontsize': 'large',\n", " 'legend.frameon': True,\n", " 'legend.handleheight': 0.7,\n", " 'legend.handlelength': 2.0,\n", " 'legend.handletextpad': 0.8,\n", " 'legend.isaxes': True,\n", " 'legend.labelspacing': 0.5,\n", " 'legend.loc': 'upper right',\n", " 'legend.markerscale': 1.0,\n", " 'legend.numpoints': 2,\n", " 'legend.shadow': False,\n", " 'lines.antialiased': True,\n", " 'lines.color': 'b',\n", " 'lines.dash_capstyle': 'butt',\n", " 'lines.dash_joinstyle': 'round',\n", " 'lines.linestyle': '-',\n", " 'lines.linewidth': 1.0,\n", " 'lines.marker': 'None',\n", " 'lines.markeredgewidth': 0.5,\n", " 'lines.markersize': 6,\n", " 'lines.solid_capstyle': 'projecting',\n", " 'lines.solid_joinstyle': 'round',\n", " 'mathtext.bf': 'serif:bold',\n", " 'mathtext.cal': 'cursive',\n", " 'mathtext.default': 'it',\n", " 'mathtext.fallback_to_cm': True,\n", " 'mathtext.fontset': 'cm',\n", " 'mathtext.it': 'serif:italic',\n", " 'mathtext.rm': 'serif',\n", " 'mathtext.sf': 'sans\\\\-serif',\n", " 'mathtext.tt': 'monospace',\n", " 'patch.antialiased': True,\n", " 'patch.edgecolor': 'k',\n", " 'patch.facecolor': 'b',\n", " 'patch.linewidth': 1.0,\n", " 'path.simplify': True,\n", " 'path.simplify_threshold': 0.1111111111111111,\n", " 'path.snap': True,\n", " 'pdf.compression': 6,\n", " 'pdf.fonttype': 3,\n", " 'pdf.inheritcolor': False,\n", " 'pdf.use14corefonts': False,\n", " 'pgf.debug': False,\n", " 'pgf.preamble': [''],\n", " 'pgf.rcfonts': True,\n", " 'pgf.texsystem': 'xelatex',\n", " 'plugins.directory': '.matplotlib_plugins',\n", " 'polaraxes.grid': True,\n", " 'ps.distiller.res': 6000,\n", " 'ps.fonttype': 3,\n", " 'ps.papersize': 'letter',\n", " 'ps.useafm': False,\n", " 'ps.usedistiller': False,\n", " 'savefig.bbox': None,\n", " 'savefig.dpi': 72,\n", " 'savefig.edgecolor': 'w',\n", " 'savefig.extension': 'png',\n", " 'savefig.facecolor': 'w',\n", " 'savefig.format': 'png',\n", " 'savefig.orientation': 'portrait',\n", " 'savefig.pad_inches': 0.1,\n", " 'svg.embed_char_paths': 'path',\n", " 'svg.fonttype': 'path',\n", " 'svg.image_inline': True,\n", " 'svg.image_noscale': False,\n", " 'text.antialiased': True,\n", " 'text.color': 'k',\n", " 'text.dvipnghack': None,\n", " 'text.hinting': True,\n", " 'text.hinting_factor': 8,\n", " 'text.latex.preamble': [''],\n", " 'text.latex.preview': False,\n", " 'text.latex.unicode': False,\n", " 'text.usetex': False,\n", " 'timezone': 'UTC',\n", " 'tk.pythoninspect': False,\n", " 'tk.window_focus': False,\n", " 'toolbar': 'toolbar2',\n", " 'verbose.fileo': 'sys.stdout',\n", " 'verbose.level': 'silent',\n", " 'xtick.color': 'k',\n", " 'xtick.direction': 'in',\n", " 'xtick.labelsize': 'medium',\n", " 'xtick.major.pad': 4,\n", " 'xtick.major.size': 4,\n", " 'xtick.major.width': 0.5,\n", " 'xtick.minor.pad': 4,\n", " 'xtick.minor.size': 2,\n", " 'xtick.minor.width': 0.5,\n", " 'ytick.color': 'k',\n", " 'ytick.direction': 'in',\n", " 'ytick.labelsize': 'medium',\n", " 'ytick.major.pad': 4,\n", " 'ytick.major.size': 4,\n", " 'ytick.major.width': 0.5,\n", " 'ytick.minor.pad': 4,\n", " 'ytick.minor.size': 2,\n", " 'ytick.minor.width': 0.5},\n", " 'rcParamsDefault': {'agg.path.chunksize': 0,\n", " 'animation.bitrate': -1,\n", " 'animation.codec': 'mpeg4',\n", " 'animation.ffmpeg_args': '',\n", " 'animation.ffmpeg_path': 'ffmpeg',\n", " 'animation.frame_format': 'png',\n", " 'animation.mencoder_args': '',\n", " 'animation.mencoder_path': 'mencoder',\n", " 'animation.writer': 'ffmpeg',\n", " 'axes.axisbelow': False,\n", " 'axes.color_cycle': ['b', 'g', 'r', 'c', 'm', 'y', 'k'],\n", " 'axes.edgecolor': 'k',\n", " 'axes.facecolor': 'w',\n", " 'axes.formatter.limits': [-7, 7],\n", " 'axes.formatter.use_locale': False,\n", " 'axes.formatter.use_mathtext': False,\n", " 'axes.grid': False,\n", " 'axes.hold': True,\n", " 'axes.labelcolor': 'k',\n", " 'axes.labelsize': 'medium',\n", " 'axes.labelweight': 'normal',\n", " 'axes.linewidth': 1.0,\n", " 'axes.titlesize': 'large',\n", " 'axes.unicode_minus': True,\n", " 'axes3d.grid': True,\n", " 'backend': 'Agg',\n", " 'backend.qt4': 'PyQt4',\n", " 'backend_fallback': True,\n", " 'contour.negative_linestyle': 'dashed',\n", " 'datapath': '/usr/local/lib/python2.7/site-packages/matplotlib/mpl-data',\n", " 'docstring.hardcopy': False,\n", " 'figure.autolayout': False,\n", " 'figure.dpi': 80,\n", " 'figure.edgecolor': 'w',\n", " 'figure.facecolor': '0.75',\n", " 'figure.figsize': [8.0, 6.0],\n", " 'figure.subplot.bottom': 0.1,\n", " 'figure.subplot.hspace': 0.2,\n", " 'figure.subplot.left': 0.125,\n", " 'figure.subplot.right': 0.9,\n", " 'figure.subplot.top': 0.9,\n", " 'figure.subplot.wspace': 0.2,\n", " 'font.cursive': ['Apple Chancery',\n", " 'Textile',\n", " 'Zapf Chancery',\n", " 'Sand',\n", " 'cursive'],\n", " 'font.family': 'sans-serif',\n", " 'font.fantasy': ['Comic Sans MS',\n", " 'Chicago',\n", " 'Charcoal',\n", " 'ImpactWestern',\n", " 'fantasy'],\n", " 'font.monospace': ['Bitstream Vera Sans Mono',\n", " 'DejaVu Sans Mono',\n", " 'Andale Mono',\n", " 'Nimbus Mono L',\n", " 'Courier New',\n", " 'Courier',\n", " 'Fixed',\n", " 'Terminal',\n", " 'monospace'],\n", " 'font.sans-serif': ['Bitstream Vera Sans',\n", " 'DejaVu Sans',\n", " 'Lucida Grande',\n", " 'Verdana',\n", " 'Geneva',\n", " 'Lucid',\n", " 'Arial',\n", " 'Helvetica',\n", " 'Avant Garde',\n", " 'sans-serif'],\n", " 'font.serif': ['Bitstream Vera Serif',\n", " 'DejaVu Serif',\n", " 'New Century Schoolbook',\n", " 'Century Schoolbook L',\n", " 'Utopia',\n", " 'ITC Bookman',\n", " 'Bookman',\n", " 'Nimbus Roman No9 L',\n", " 'Times New Roman',\n", " 'Times',\n", " 'Palatino',\n", " 'Charter',\n", " 'serif'],\n", " 'font.size': 12,\n", " 'font.stretch': 'normal',\n", " 'font.style': 'normal',\n", " 'font.variant': 'normal',\n", " 'font.weight': 'normal',\n", " 'grid.alpha': 1.0,\n", " 'grid.color': 'k',\n", " 'grid.linestyle': ':',\n", " 'grid.linewidth': 0.5,\n", " 'image.aspect': 'equal',\n", " 'image.cmap': 'jet',\n", " 'image.interpolation': 'bilinear',\n", " 'image.lut': 256,\n", " 'image.origin': 'upper',\n", " 'image.resample': False,\n", " 'interactive': False,\n", " 'keymap.all_axes': 'a',\n", " 'keymap.back': ['left', 'c', 'backspace'],\n", " 'keymap.forward': ['right', 'v'],\n", " 'keymap.fullscreen': ('f', 'ctrl+f'),\n", " 'keymap.grid': 'g',\n", " 'keymap.home': ['h', 'r', 'home'],\n", " 'keymap.pan': 'p',\n", " 'keymap.quit': ('ctrl+w',),\n", " 'keymap.save': ('s', 'ctrl+s'),\n", " 'keymap.xscale': ['k', 'L'],\n", " 'keymap.yscale': 'l',\n", " 'keymap.zoom': 'o',\n", " 'legend.borderaxespad': 0.5,\n", " 'legend.borderpad': 0.4,\n", " 'legend.columnspacing': 2.0,\n", " 'legend.fancybox': False,\n", " 'legend.fontsize': 'large',\n", " 'legend.frameon': True,\n", " 'legend.handleheight': 0.7,\n", " 'legend.handlelength': 2.0,\n", " 'legend.handletextpad': 0.8,\n", " 'legend.isaxes': True,\n", " 'legend.labelspacing': 0.5,\n", " 'legend.loc': 'upper right',\n", " 'legend.markerscale': 1.0,\n", " 'legend.numpoints': 2,\n", " 'legend.shadow': False,\n", " 'lines.antialiased': True,\n", " 'lines.color': 'b',\n", " 'lines.dash_capstyle': 'butt',\n", " 'lines.dash_joinstyle': 'round',\n", " 'lines.linestyle': '-',\n", " 'lines.linewidth': 1.0,\n", " 'lines.marker': 'None',\n", " 'lines.markeredgewidth': 0.5,\n", " 'lines.markersize': 6,\n", " 'lines.solid_capstyle': 'projecting',\n", " 'lines.solid_joinstyle': 'round',\n", " 'mathtext.bf': 'serif:bold',\n", " 'mathtext.cal': 'cursive',\n", " 'mathtext.default': 'it',\n", " 'mathtext.fallback_to_cm': True,\n", " 'mathtext.fontset': 'cm',\n", " 'mathtext.it': 'serif:italic',\n", " 'mathtext.rm': 'serif',\n", " 'mathtext.sf': 'sans\\\\-serif',\n", " 'mathtext.tt': 'monospace',\n", " 'patch.antialiased': True,\n", " 'patch.edgecolor': 'k',\n", " 'patch.facecolor': 'b',\n", " 'patch.linewidth': 1.0,\n", " 'path.simplify': True,\n", " 'path.simplify_threshold': 0.1111111111111111,\n", " 'path.snap': True,\n", " 'pdf.compression': 6,\n", " 'pdf.fonttype': 3,\n", " 'pdf.inheritcolor': False,\n", " 'pdf.use14corefonts': False,\n", " 'pgf.debug': False,\n", " 'pgf.preamble': [''],\n", " 'pgf.rcfonts': True,\n", " 'pgf.texsystem': 'xelatex',\n", " 'plugins.directory': '.matplotlib_plugins',\n", " 'polaraxes.grid': True,\n", " 'ps.distiller.res': 6000,\n", " 'ps.fonttype': 3,\n", " 'ps.papersize': 'letter',\n", " 'ps.useafm': False,\n", " 'ps.usedistiller': False,\n", " 'savefig.bbox': None,\n", " 'savefig.dpi': 100,\n", " 'savefig.edgecolor': 'w',\n", " 'savefig.extension': 'png',\n", " 'savefig.facecolor': 'w',\n", " 'savefig.format': 'png',\n", " 'savefig.orientation': 'portrait',\n", " 'savefig.pad_inches': 0.1,\n", " 'svg.embed_char_paths': 'path',\n", " 'svg.fonttype': 'path',\n", " 'svg.image_inline': True,\n", " 'svg.image_noscale': False,\n", " 'text.antialiased': True,\n", " 'text.color': 'k',\n", " 'text.dvipnghack': None,\n", " 'text.hinting': True,\n", " 'text.hinting_factor': 8,\n", " 'text.latex.preamble': [''],\n", " 'text.latex.preview': False,\n", " 'text.latex.unicode': False,\n", " 'text.usetex': False,\n", " 'timezone': 'UTC',\n", " 'tk.pythoninspect': False,\n", " 'tk.window_focus': False,\n", " 'toolbar': 'toolbar2',\n", " 'verbose.fileo': 'sys.stdout',\n", " 'verbose.level': 'silent',\n", " 'xtick.color': 'k',\n", " 'xtick.direction': 'in',\n", " 'xtick.labelsize': 'medium',\n", " 'xtick.major.pad': 4,\n", " 'xtick.major.size': 4,\n", " 'xtick.major.width': 0.5,\n", " 'xtick.minor.pad': 4,\n", " 'xtick.minor.size': 2,\n", " 'xtick.minor.width': 0.5,\n", " 'ytick.color': 'k',\n", " 'ytick.direction': 'in',\n", " 'ytick.labelsize': 'medium',\n", " 'ytick.major.pad': 4,\n", " 'ytick.major.size': 4,\n", " 'ytick.major.width': 0.5,\n", " 'ytick.minor.pad': 4,\n", " 'ytick.minor.size': 2,\n", " 'ytick.minor.width': 0.5},\n", " 'rcdefaults': ,\n", " 'real': ,\n", " 'real_if_close': ,\n", " 'rec': ,\n", " 'rec2csv': ,\n", " 'rec_append_fields': ,\n", " 'rec_drop_fields': ,\n", " 'rec_join': ,\n", " 'recarray': numpy.core.records.recarray,\n", " 'recfromcsv': ,\n", " 'recfromtxt': ,\n", " 'reciprocal': ,\n", " 'record': numpy.core.records.record,\n", " 'register_cmap': ,\n", " 'relativedelta': dateutil.relativedelta.relativedelta,\n", " 'remainder': ,\n", " 'repeat': ,\n", " 'require': ,\n", " 'reshape': ,\n", " 'resize': ,\n", " 'restoredot': ,\n", " 'result_type': ,\n", " 'rfft': ,\n", " 'rfft2': ,\n", " 'rfftn': ,\n", " 'rgrids': ,\n", " 'right_shift': ,\n", " 'rint': ,\n", " 'rk4': ,\n", " 'rms_flat': ,\n", " 'roll': ,\n", " 'rollaxis': ,\n", " 'roots': ,\n", " 'rot90': ,\n", " 'round_': ,\n", " 'row_stack': ,\n", " 'rrule': dateutil.rrule.rrule,\n", " 's_': ,\n", " 'safe_eval': ,\n", " 'sample': ,\n", " 'save': ,\n", " 'savefig': ,\n", " 'savetxt': ,\n", " 'savez': ,\n", " 'savez_compressed': ,\n", " 'sca': ,\n", " 'scatter': ,\n", " 'sci': ,\n", " 'sctype2char': ,\n", " 'sctypeDict': {0: numpy.bool_,\n", " 1: numpy.int8,\n", " 2: numpy.uint8,\n", " 3: numpy.int16,\n", " 4: numpy.uint16,\n", " 5: numpy.int32,\n", " 6: numpy.uint32,\n", " 7: numpy.int64,\n", " 8: numpy.uint64,\n", " 9: numpy.int64,\n", " 10: numpy.uint64,\n", " 11: numpy.float32,\n", " 12: numpy.float64,\n", " 13: numpy.float128,\n", " 14: numpy.complex64,\n", " 15: numpy.complex128,\n", " 16: numpy.complex256,\n", " 17: numpy.object_,\n", " 18: numpy.string_,\n", " 19: numpy.unicode_,\n", " 20: numpy.void,\n", " 21: numpy.datetime64,\n", " 22: numpy.timedelta64,\n", " 23: numpy.float16,\n", " '?': numpy.bool_,\n", " 'B': numpy.uint8,\n", " 'Bool': numpy.bool_,\n", " 'Complex128': numpy.complex256,\n", " 'Complex32': numpy.complex64,\n", " 'Complex64': numpy.complex128,\n", " 'D': numpy.complex128,\n", " 'Datetime64': numpy.datetime64,\n", " 'F': numpy.complex64,\n", " 'Float128': numpy.float128,\n", " 'Float16': numpy.float16,\n", " 'Float32': numpy.float32,\n", " 'Float64': numpy.float64,\n", " 'G': numpy.complex256,\n", " 'H': numpy.uint16,\n", " 'I': numpy.uint32,\n", " 'Int16': numpy.int16,\n", " 'Int32': numpy.int32,\n", " 'Int64': numpy.int64,\n", " 'Int8': numpy.int8,\n", " 'L': numpy.uint64,\n", " 'M': numpy.datetime64,\n", " 'M8': numpy.datetime64,\n", " 'O': numpy.object_,\n", " 'O8': numpy.object_,\n", " 'Object0': numpy.object_,\n", " 'P': numpy.uint64,\n", " 'Q': numpy.uint64,\n", " 'S': numpy.string_,\n", " 'String0': numpy.string_,\n", " 'Timedelta64': numpy.timedelta64,\n", " 'U': numpy.unicode_,\n", " 'UInt16': numpy.uint16,\n", " 'UInt32': numpy.uint32,\n", " 'UInt64': numpy.uint64,\n", " 'UInt8': numpy.uint8,\n", " 'Unicode0': numpy.unicode_,\n", " 'V': numpy.void,\n", " 'Void0': numpy.void,\n", " 'a': numpy.string_,\n", " 'b': numpy.int8,\n", " 'b1': numpy.bool_,\n", " 'bool': numpy.bool_,\n", " 'bool8': numpy.bool_,\n", " 'bool_': numpy.bool_,\n", " 'byte': numpy.int8,\n", " 'bytes_': numpy.string_,\n", " 'c16': numpy.complex128,\n", " 'c32': numpy.complex256,\n", " 'c8': numpy.complex64,\n", " 'cdouble': numpy.complex128,\n", " 'cfloat': numpy.complex128,\n", " 'clongdouble': numpy.complex256,\n", " 'clongfloat': numpy.complex256,\n", " 'complex': numpy.complex128,\n", " 'complex128': numpy.complex128,\n", " 'complex256': numpy.complex256,\n", " 'complex64': numpy.complex64,\n", " 'complex_': numpy.complex128,\n", " 'csingle': numpy.complex64,\n", " 'd': numpy.float64,\n", " 'datetime64': numpy.datetime64,\n", " 'double': numpy.float64,\n", " 'e': numpy.float16,\n", " 'f': numpy.float32,\n", " 'f16': numpy.float128,\n", " 'f2': numpy.float16,\n", " 'f4': numpy.float32,\n", " 'f8': numpy.float64,\n", " 'float': numpy.float64,\n", " 'float128': numpy.float128,\n", " 'float16': numpy.float16,\n", " 'float32': numpy.float32,\n", " 'float64': numpy.float64,\n", " 'float_': numpy.float64,\n", " 'g': numpy.float128,\n", " 'h': numpy.int16,\n", " 'half': numpy.float16,\n", " 'i': numpy.int32,\n", " 'i1': numpy.int8,\n", " 'i2': numpy.int16,\n", " 'i4': numpy.int32,\n", " 'i8': numpy.int64,\n", " 'int': numpy.int64,\n", " 'int0': numpy.int64,\n", " 'int16': numpy.int16,\n", " 'int32': numpy.int32,\n", " 'int64': numpy.int64,\n", " 'int8': numpy.int8,\n", " 'int_': numpy.int64,\n", " 'intc': numpy.int32,\n", " 'intp': numpy.int64,\n", " 'l': numpy.int64,\n", " 'longcomplex': numpy.complex256,\n", " 'longdouble': numpy.float128,\n", " 'longfloat': numpy.float128,\n", " 'longlong': numpy.int64,\n", " 'm': numpy.timedelta64,\n", " 'm8': numpy.timedelta64,\n", " 'object': numpy.object_,\n", " 'object0': numpy.object_,\n", " 'object_': numpy.object_,\n", " 'p': numpy.int64,\n", " 'q': numpy.int64,\n", " 'short': numpy.int16,\n", " 'single': numpy.float32,\n", " 'singlecomplex': numpy.complex64,\n", " 'str': numpy.string_,\n", " 'str_': numpy.string_,\n", " 'string': numpy.string_,\n", " 'string0': numpy.string_,\n", " 'string_': numpy.string_,\n", " 'timedelta64': numpy.timedelta64,\n", " 'u1': numpy.uint8,\n", " 'u2': numpy.uint16,\n", " 'u4': numpy.uint32,\n", " 'u8': numpy.uint64,\n", " 'ubyte': numpy.uint8,\n", " 'uint': numpy.uint64,\n", " 'uint0': numpy.uint64,\n", " 'uint16': numpy.uint16,\n", " 'uint32': numpy.uint32,\n", " 'uint64': numpy.uint64,\n", " 'uint8': numpy.uint8,\n", " 'uintc': numpy.uint32,\n", " 'uintp': numpy.uint64,\n", " 'ulonglong': numpy.uint64,\n", " 'unicode': numpy.unicode_,\n", " 'unicode0': numpy.unicode_,\n", " 'unicode_': numpy.unicode_,\n", " 'ushort': numpy.uint16,\n", " 'void': numpy.void,\n", " 'void0': numpy.void},\n", " 'sctypeNA': {'?': 'Bool',\n", " 'B': 'UInt8',\n", " 'Bool': numpy.bool_,\n", " 'Complex128': numpy.complex256,\n", " 'Complex32': numpy.complex64,\n", " 'Complex64': numpy.complex128,\n", " 'D': 'Complex64',\n", " 'Datetime64': numpy.datetime64,\n", " 'F': 'Complex32',\n", " 'Float128': numpy.float128,\n", " 'Float16': numpy.float16,\n", " 'Float32': numpy.float32,\n", " 'Float64': numpy.float64,\n", " 'G': 'Complex128',\n", " 'H': 'UInt16',\n", " 'I': 'UInt32',\n", " 'Int16': numpy.int16,\n", " 'Int32': numpy.int32,\n", " 'Int64': numpy.int64,\n", " 'Int8': numpy.int8,\n", " 'L': 'UInt64',\n", " 'M': 'Datetime64',\n", " 'M8': 'Datetime64',\n", " 'O': 'Object0',\n", " 'Object0': numpy.object_,\n", " 'Q': 'UInt64',\n", " 'S': 'String0',\n", " 'String0': numpy.string_,\n", " 'Timedelta64': numpy.timedelta64,\n", " 'U': 'Unicode0',\n", " 'UInt16': numpy.uint16,\n", " 'UInt32': numpy.uint32,\n", " 'UInt64': numpy.uint64,\n", " 'UInt8': numpy.uint8,\n", " 'Unicode0': numpy.unicode_,\n", " 'V': 'Void0',\n", " 'Void0': numpy.void,\n", " 'b': 'Int8',\n", " 'b1': 'Bool',\n", " 'c16': 'Complex64',\n", " 'c32': 'Complex128',\n", " 'c8': 'Complex32',\n", " 'd': 'Float64',\n", " 'e': 'Float16',\n", " 'f': 'Float32',\n", " 'f16': 'Float128',\n", " 'f2': 'Float16',\n", " 'f4': 'Float32',\n", " 'f8': 'Float64',\n", " 'g': 'Float128',\n", " 'h': 'Int16',\n", " 'i': 'Int32',\n", " 'i1': numpy.int8,\n", " 'i2': numpy.int16,\n", " 'i4': numpy.int32,\n", " 'i8': numpy.int64,\n", " 'l': 'Int64',\n", " 'm': 'Timedelta64',\n", " 'm8': 'Timedelta64',\n", " 'q': 'Int64',\n", " 'u1': numpy.uint8,\n", " 'u2': numpy.uint16,\n", " 'u4': numpy.uint32,\n", " 'u8': numpy.uint64,\n", " numpy.bool_: 'Bool',\n", " numpy.int8: 'Int8',\n", " numpy.int16: 'Int16',\n", " numpy.int32: 'Int32',\n", " numpy.int64: 'Int64',\n", " numpy.int64: 'Int64',\n", " numpy.uint8: 'UInt8',\n", " numpy.uint16: 'UInt16',\n", " numpy.uint32: 'UInt32',\n", " numpy.uint64: 'UInt64',\n", " numpy.uint64: 'UInt64',\n", " numpy.string_: 'String0',\n", " numpy.unicode_: 'Unicode0',\n", " numpy.void: 'Void0',\n", " numpy.float16: 'Float16',\n", " numpy.float32: 'Float32',\n", " numpy.float64: 'Float64',\n", " numpy.float128: 'Float128',\n", " numpy.complex64: 'Complex32',\n", " numpy.complex128: 'Complex64',\n", " numpy.complex256: 'Complex128',\n", " numpy.object_: 'Object0',\n", " numpy.datetime64: 'Datetime64',\n", " numpy.timedelta64: 'Timedelta64'},\n", " 'sctypes': {'complex': [numpy.complex64, numpy.complex128, numpy.complex256],\n", " 'float': [numpy.float16, numpy.float32, numpy.float64, numpy.float128],\n", " 'int': [numpy.int8, numpy.int16, numpy.int32, numpy.int64],\n", " 'others': [bool, object, str, unicode, numpy.void],\n", " 'uint': [numpy.uint8, numpy.uint16, numpy.uint32, numpy.uint64]},\n", " 'searchsorted': ,\n", " 'seed': ,\n", " 'segments_intersect': ,\n", " 'select': ,\n", " 'semilogx': ,\n", " 'semilogy': ,\n", " 'set_cmap': ,\n", " 'set_numeric_ops': ,\n", " 'set_printoptions': ,\n", " 'set_state': ,\n", " 'set_string_function': ,\n", " 'setbufsize': ,\n", " 'setdiff1d': ,\n", " 'seterr': ,\n", " 'seterrcall': ,\n", " 'seterrobj': ,\n", " 'setp': ,\n", " 'setxor1d': ,\n", " 'shape': ,\n", " 'short': numpy.int16,\n", " 'show': ,\n", " 'show_config': ,\n", " 'shuffle': ,\n", " 'sign': ,\n", " 'signbit': ,\n", " 'signedinteger': numpy.signedinteger,\n", " 'silent_list': matplotlib.cbook.silent_list,\n", " 'sin': ,\n", " 'sinc': ,\n", " 'single': numpy.float32,\n", " 'singlecomplex': numpy.complex64,\n", " 'sinh': ,\n", " 'size': ,\n", " 'slogdet': ,\n", " 'slopes': ,\n", " 'solve': ,\n", " 'sometrue': ,\n", " 'sort': ,\n", " 'sort_complex': ,\n", " 'source': ,\n", " 'spacing': ,\n", " 'specgram': ,\n", " 'spectral': ,\n", " 'split': ,\n", " 'spring': ,\n", " 'spy': ,\n", " 'sqrt': ,\n", " 'square': ,\n", " 'squeeze': ,\n", " 'stackplot': ,\n", " 'standard_cauchy': ,\n", " 'standard_exponential': ,\n", " 'standard_gamma': ,\n", " 'standard_normal': ,\n", " 'standard_t': ,\n", " 'std': ,\n", " 'stem': ,\n", " 'step': ,\n", " 'stineman_interp': ,\n", " 'str_': numpy.string_,\n", " 'streamplot': ,\n", " 'string0': numpy.string_,\n", " 'string_': numpy.string_,\n", " 'strpdate2num': matplotlib.dates.strpdate2num,\n", " 'subplot': ,\n", " 'subplot2grid': ,\n", " 'subplot_tool': ,\n", " 'subplots': ,\n", " 'subplots_adjust': ,\n", " 'subtract': ,\n", " 'sum': ,\n", " 'summer': ,\n", " 'suptitle': ,\n", " 'svd': ,\n", " 'swapaxes': ,\n", " 'switch_backend': ,\n", " 'sys': ,\n", " 'table': ,\n", " 'take': ,\n", " 'tan': ,\n", " 'tanh': ,\n", " 'tensordot': ,\n", " 'tensorinv': ,\n", " 'tensorsolve': ,\n", " 'test': >,\n", " 'text': ,\n", " 'thetagrids': ,\n", " 'tick_params': ,\n", " 'ticklabel_format': ,\n", " 'tight_layout': ,\n", " 'tile': ,\n", " 'timedelta64': numpy.timedelta64,\n", " 'title': ,\n", " 'trace': ,\n", " 'transpose': ,\n", " 'trapz': ,\n", " 'tri': ,\n", " 'triangular': ,\n", " 'tricontour': ,\n", " 'tricontourf': ,\n", " 'tril': ,\n", " 'tril_indices': ,\n", " 'tril_indices_from': ,\n", " 'trim_zeros': ,\n", " 'tripcolor': ,\n", " 'triplot': ,\n", " 'triu': ,\n", " 'triu_indices': ,\n", " 'triu_indices_from': ,\n", " 'true_divide': ,\n", " 'trunc': ,\n", " 'twinx': ,\n", " 'twiny': ,\n", " 'typeDict': {0: numpy.bool_,\n", " 1: numpy.int8,\n", " 2: numpy.uint8,\n", " 3: numpy.int16,\n", " 4: numpy.uint16,\n", " 5: numpy.int32,\n", " 6: numpy.uint32,\n", " 7: numpy.int64,\n", " 8: numpy.uint64,\n", " 9: numpy.int64,\n", " 10: numpy.uint64,\n", " 11: numpy.float32,\n", " 12: numpy.float64,\n", " 13: numpy.float128,\n", " 14: numpy.complex64,\n", " 15: numpy.complex128,\n", " 16: numpy.complex256,\n", " 17: numpy.object_,\n", " 18: numpy.string_,\n", " 19: numpy.unicode_,\n", " 20: numpy.void,\n", " 21: numpy.datetime64,\n", " 22: numpy.timedelta64,\n", " 23: numpy.float16,\n", " '?': numpy.bool_,\n", " 'B': numpy.uint8,\n", " 'Bool': numpy.bool_,\n", " 'Complex128': numpy.complex256,\n", " 'Complex32': numpy.complex64,\n", " 'Complex64': numpy.complex128,\n", " 'D': numpy.complex128,\n", " 'Datetime64': numpy.datetime64,\n", " 'F': numpy.complex64,\n", " 'Float128': numpy.float128,\n", " 'Float16': numpy.float16,\n", " 'Float32': numpy.float32,\n", " 'Float64': numpy.float64,\n", " 'G': numpy.complex256,\n", " 'H': numpy.uint16,\n", " 'I': numpy.uint32,\n", " 'Int16': numpy.int16,\n", " 'Int32': numpy.int32,\n", " 'Int64': numpy.int64,\n", " 'Int8': numpy.int8,\n", " 'L': numpy.uint64,\n", " 'M': numpy.datetime64,\n", " 'M8': numpy.datetime64,\n", " 'O': numpy.object_,\n", " 'O8': numpy.object_,\n", " 'Object0': numpy.object_,\n", " 'P': numpy.uint64,\n", " 'Q': numpy.uint64,\n", " 'S': numpy.string_,\n", " 'String0': numpy.string_,\n", " 'Timedelta64': numpy.timedelta64,\n", " 'U': numpy.unicode_,\n", " 'UInt16': numpy.uint16,\n", " 'UInt32': numpy.uint32,\n", " 'UInt64': numpy.uint64,\n", " 'UInt8': numpy.uint8,\n", " 'Unicode0': numpy.unicode_,\n", " 'V': numpy.void,\n", " 'Void0': numpy.void,\n", " 'a': numpy.string_,\n", " 'b': numpy.int8,\n", " 'b1': numpy.bool_,\n", " 'bool': numpy.bool_,\n", " 'bool8': numpy.bool_,\n", " 'bool_': numpy.bool_,\n", " 'byte': numpy.int8,\n", " 'bytes_': numpy.string_,\n", " 'c16': numpy.complex128,\n", " 'c32': numpy.complex256,\n", " 'c8': numpy.complex64,\n", " 'cdouble': numpy.complex128,\n", " 'cfloat': numpy.complex128,\n", " 'clongdouble': numpy.complex256,\n", " 'clongfloat': numpy.complex256,\n", " 'complex': numpy.complex128,\n", " 'complex128': numpy.complex128,\n", " 'complex256': numpy.complex256,\n", " 'complex64': numpy.complex64,\n", " 'complex_': numpy.complex128,\n", " 'csingle': numpy.complex64,\n", " 'd': numpy.float64,\n", " 'datetime64': numpy.datetime64,\n", " 'double': numpy.float64,\n", " 'e': numpy.float16,\n", " 'f': numpy.float32,\n", " 'f16': numpy.float128,\n", " 'f2': numpy.float16,\n", " 'f4': numpy.float32,\n", " 'f8': numpy.float64,\n", " 'float': numpy.float64,\n", " 'float128': numpy.float128,\n", " 'float16': numpy.float16,\n", " 'float32': numpy.float32,\n", " 'float64': numpy.float64,\n", " 'float_': numpy.float64,\n", " 'g': numpy.float128,\n", " 'h': numpy.int16,\n", " 'half': numpy.float16,\n", " 'i': numpy.int32,\n", " 'i1': numpy.int8,\n", " 'i2': numpy.int16,\n", " 'i4': numpy.int32,\n", " 'i8': numpy.int64,\n", " 'int': numpy.int64,\n", " 'int0': numpy.int64,\n", " 'int16': numpy.int16,\n", " 'int32': numpy.int32,\n", " 'int64': numpy.int64,\n", " 'int8': numpy.int8,\n", " 'int_': numpy.int64,\n", " 'intc': numpy.int32,\n", " 'intp': numpy.int64,\n", " 'l': numpy.int64,\n", " 'longcomplex': numpy.complex256,\n", " 'longdouble': numpy.float128,\n", " 'longfloat': numpy.float128,\n", " 'longlong': numpy.int64,\n", " 'm': numpy.timedelta64,\n", " 'm8': numpy.timedelta64,\n", " 'object': numpy.object_,\n", " 'object0': numpy.object_,\n", " 'object_': numpy.object_,\n", " 'p': numpy.int64,\n", " 'q': numpy.int64,\n", " 'short': numpy.int16,\n", " 'single': numpy.float32,\n", " 'singlecomplex': numpy.complex64,\n", " 'str': numpy.string_,\n", " 'str_': numpy.string_,\n", " 'string': numpy.string_,\n", " 'string0': numpy.string_,\n", " 'string_': numpy.string_,\n", " 'timedelta64': numpy.timedelta64,\n", " 'u1': numpy.uint8,\n", " 'u2': numpy.uint16,\n", " 'u4': numpy.uint32,\n", " 'u8': numpy.uint64,\n", " 'ubyte': numpy.uint8,\n", " 'uint': numpy.uint64,\n", " 'uint0': numpy.uint64,\n", " 'uint16': numpy.uint16,\n", " 'uint32': numpy.uint32,\n", " 'uint64': numpy.uint64,\n", " 'uint8': numpy.uint8,\n", " 'uintc': numpy.uint32,\n", " 'uintp': numpy.uint64,\n", " 'ulonglong': numpy.uint64,\n", " 'unicode': numpy.unicode_,\n", " 'unicode0': numpy.unicode_,\n", " 'unicode_': numpy.unicode_,\n", " 'ushort': numpy.uint16,\n", " 'void': numpy.void,\n", " 'void0': numpy.void},\n", " 'typeNA': {'?': 'Bool',\n", " 'B': 'UInt8',\n", " 'Bool': numpy.bool_,\n", " 'Complex128': numpy.complex256,\n", " 'Complex32': numpy.complex64,\n", " 'Complex64': numpy.complex128,\n", " 'D': 'Complex64',\n", " 'Datetime64': numpy.datetime64,\n", " 'F': 'Complex32',\n", " 'Float128': numpy.float128,\n", " 'Float16': numpy.float16,\n", " 'Float32': numpy.float32,\n", " 'Float64': numpy.float64,\n", " 'G': 'Complex128',\n", " 'H': 'UInt16',\n", " 'I': 'UInt32',\n", " 'Int16': numpy.int16,\n", " 'Int32': numpy.int32,\n", " 'Int64': numpy.int64,\n", " 'Int8': numpy.int8,\n", " 'L': 'UInt64',\n", " 'M': 'Datetime64',\n", " 'M8': 'Datetime64',\n", " 'O': 'Object0',\n", " 'Object0': numpy.object_,\n", " 'Q': 'UInt64',\n", " 'S': 'String0',\n", " 'String0': numpy.string_,\n", " 'Timedelta64': numpy.timedelta64,\n", " 'U': 'Unicode0',\n", " 'UInt16': numpy.uint16,\n", " 'UInt32': numpy.uint32,\n", " 'UInt64': numpy.uint64,\n", " 'UInt8': numpy.uint8,\n", " 'Unicode0': numpy.unicode_,\n", " 'V': 'Void0',\n", " 'Void0': numpy.void,\n", " 'b': 'Int8',\n", " 'b1': 'Bool',\n", " 'c16': 'Complex64',\n", " 'c32': 'Complex128',\n", " 'c8': 'Complex32',\n", " 'd': 'Float64',\n", " 'e': 'Float16',\n", " 'f': 'Float32',\n", " 'f16': 'Float128',\n", " 'f2': 'Float16',\n", " 'f4': 'Float32',\n", " 'f8': 'Float64',\n", " 'g': 'Float128',\n", " 'h': 'Int16',\n", " 'i': 'Int32',\n", " 'i1': numpy.int8,\n", " 'i2': numpy.int16,\n", " 'i4': numpy.int32,\n", " 'i8': numpy.int64,\n", " 'l': 'Int64',\n", " 'm': 'Timedelta64',\n", " 'm8': 'Timedelta64',\n", " 'q': 'Int64',\n", " 'u1': numpy.uint8,\n", " 'u2': numpy.uint16,\n", " 'u4': numpy.uint32,\n", " 'u8': numpy.uint64,\n", " numpy.bool_: 'Bool',\n", " numpy.int8: 'Int8',\n", " numpy.int16: 'Int16',\n", " numpy.int32: 'Int32',\n", " numpy.int64: 'Int64',\n", " numpy.int64: 'Int64',\n", " numpy.uint8: 'UInt8',\n", " numpy.uint16: 'UInt16',\n", " numpy.uint32: 'UInt32',\n", " numpy.uint64: 'UInt64',\n", " numpy.uint64: 'UInt64',\n", " numpy.string_: 'String0',\n", " numpy.unicode_: 'Unicode0',\n", " numpy.void: 'Void0',\n", " numpy.float16: 'Float16',\n", " numpy.float32: 'Float32',\n", " numpy.float64: 'Float64',\n", " numpy.float128: 'Float128',\n", " numpy.complex64: 'Complex32',\n", " numpy.complex128: 'Complex64',\n", " numpy.complex256: 'Complex128',\n", " numpy.object_: 'Object0',\n", " numpy.datetime64: 'Datetime64',\n", " numpy.timedelta64: 'Timedelta64'},\n", " 'typecodes': {'All': '?bhilqpBHILQPefdgFDGSUVOMm',\n", " 'AllFloat': 'efdgFDG',\n", " 'AllInteger': 'bBhHiIlLqQpP',\n", " 'Character': 'c',\n", " 'Complex': 'FDG',\n", " 'Datetime': 'Mm',\n", " 'Float': 'efdg',\n", " 'Integer': 'bhilqp',\n", " 'UnsignedInteger': 'BHILQP'},\n", " 'typename': ,\n", " 'ubyte': numpy.uint8,\n", " 'ufunc': numpy.ufunc,\n", " 'uint': numpy.uint64,\n", " 'uint0': numpy.uint64,\n", " 'uint16': numpy.uint16,\n", " 'uint32': numpy.uint32,\n", " 'uint64': numpy.uint64,\n", " 'uint8': numpy.uint8,\n", " 'uintc': numpy.uint32,\n", " 'uintp': numpy.uint64,\n", " 'ulonglong': numpy.uint64,\n", " 'unicode0': numpy.unicode_,\n", " 'unicode_': numpy.unicode_,\n", " 'uniform': ,\n", " 'union1d': ,\n", " 'unique': ,\n", " 'unpackbits': ,\n", " 'unravel_index': ,\n", " 'unsignedinteger': numpy.unsignedinteger,\n", " 'unwrap': ,\n", " 'ushort': numpy.uint16,\n", " 'vander': ,\n", " 'var': ,\n", " 'vdot': ,\n", " 'vector_lengths': ,\n", " 'vectorize': numpy.lib.function_base.vectorize,\n", " 'vlines': ,\n", " 'void': numpy.void,\n", " 'void0': numpy.void,\n", " 'vonmises': ,\n", " 'vsplit': ,\n", " 'vstack': ,\n", " 'waitforbuttonpress': ,\n", " 'wald': ,\n", " 'warnings': ,\n", " 'weibull': ,\n", " 'where': ,\n", " 'who': ,\n", " 'window_hanning': ,\n", " 'window_none': ,\n", " 'winter': ,\n", " 'xcorr': ,\n", " 'xlabel': ,\n", " 'xlim': ,\n", " 'xscale': ,\n", " 'xticks': ,\n", " 'ylabel': ,\n", " 'ylim': ,\n", " 'yscale': ,\n", " 'yticks': ,\n", " 'zeros': ,\n", " 'zeros_like': ,\n", " 'zipf': }" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [ "%connect_info" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "{\n", " \"stdin_port\": 51727, \n", " \"ip\": \"127.0.0.1\", \n", " \"control_port\": 51728, \n", " \"hb_port\": 51729, \n", " \"signature_scheme\": \"hmac-sha256\", \n", " \"key\": \"1ec472e3-072c-4d6f-b90d-47d1c76bbc71\", \n", " \"shell_port\": 51725, \n", " \"transport\": \"tcp\", \n", " \"iopub_port\": 51726\n", "}\n", "\n", "Paste the above JSON into a file, and connect with:\n", " $> ipython --existing \n", "or, if you are local, you can connect with just:\n", " $> ipython --existing kernel-f6c5e47c-71d6-4644-b934-712daa9188fd.json \n", "or even just:\n", " $> ipython --existing \n", "if this is the most recent IPython session you have started.\n" ] } ], "prompt_number": 5 }, { "cell_type": "code", "collapsed": false, "input": [ "%qtconsole" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 6 }, { "cell_type": "code", "collapsed": false, "input": [ "%debug" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "> \u001b[0;32m\u001b[0m(4)\u001b[0;36m\u001b[0;34m()\u001b[0m\n", "\u001b[0;32m 3 \u001b[0;31m\u001b[0mY\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'c'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0m\u001b[0;32m----> 4 \u001b[0;31m\u001b[0mZ\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mX\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0mY\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0m\u001b[0;32m 5 \u001b[0;31m\u001b[0mA\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m3\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> q\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Break points?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Pdb/Ipdb is the python debug module, it provides the standatd debug function, including the break points, step in etc. After version 1.0 ipython notebook support the pdb. So we can directly debug in ipython notebook." ] }, { "cell_type": "heading", "level": 4, "metadata": {}, "source": [ "Pdb commands" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- pdb.set_trace(): set break point\n", "- h : help\n", "- n : next\n", "- l : list\n", "- s : step in\n", "- r : return\n", "- c : continue\n", "- q : quit\n", "- p : print value\n", "\n", "- %run -d theprogram.py : run debuger inside ipython" ] }, { "cell_type": "heading", "level": 4, "metadata": {}, "source": [ "Set break points" ] }, { "cell_type": "code", "collapsed": false, "input": [ "def square_sum(a,b):\n", " c=a*a\n", " d=b*b\n", " return c+d" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 9 }, { "cell_type": "code", "collapsed": false, "input": [ "import ipdb as pdb\n", "X = 1\n", "pdb.set_trace()\n", "Y = 1\n", "Z= square_sum(X,Y)\n", "for i in xrange(20):\n", " X=X+ square_sum(X,Y)/(X*X)\n", " print X\n", " pdb.set_trace()" ], "language": "python", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> 5/2\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> q\n" ] }, { "ename": "BdbQuit", "evalue": "", "output_type": "pyerr", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mBdbQuit\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mX\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0mpdb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_trace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0mY\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0mZ\u001b[0m\u001b[0;34m=\u001b[0m \u001b[0msquare_sum\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mX\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mY\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/bdb.pyc\u001b[0m in \u001b[0;36mtrace_dispatch\u001b[0;34m(self, frame, event, arg)\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdispatch_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mframe\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 51\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mevent\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m'return'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 52\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdispatch_return\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mframe\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 53\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mevent\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m'exception'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 54\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdispatch_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mframe\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/bdb.pyc\u001b[0m in \u001b[0;36mdispatch_return\u001b[0;34m(self, frame, arg)\u001b[0m\n\u001b[1;32m 84\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstop_here\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mframe\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mframe\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreturnframe\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 85\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0muser_return\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mframe\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 86\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mquitting\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mBdbQuit\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 87\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtrace_dispatch\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 88\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mBdbQuit\u001b[0m: " ] } ], "prompt_number": 13 }, { "cell_type": "code", "collapsed": false, "input": [ "%run -d sample_debug.py : run debuger inside ipython" ], "language": "python", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> l\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> l\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> l\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> n\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> n\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> n\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> n\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> c\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> c\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> c\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> c\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> c\n" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> q\n" ] } ], "prompt_number": 6 }, { "cell_type": "code", "collapsed": false, "input": [ "%pdb" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 14 }, { "cell_type": "code", "collapsed": false, "input": [ "X = 1\n", "Y = 'c'\n", "Z = X+Y\n", "A = 1" ], "language": "python", "metadata": {}, "outputs": [ { "ename": "TypeError", "evalue": "unsupported operand type(s) for +: 'int' and 'str'", "output_type": "pyerr", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mX\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mY\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'c'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mZ\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mX\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0mY\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mA\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mTypeError\u001b[0m: unsupported operand type(s) for +: 'int' and 'str'" ] }, { "name": "stdout", "output_type": "stream", "stream": "stdout", "text": [ "ipdb> q\n" ] } ], "prompt_number": 15 } ], "metadata": {} } ] }