tailieunhanh - Python Scientific lecture notes

This book is the teaching material on the scientific Python ecosystem, a quick introduction to central tools and techniques. The different chapters each correspond to a 1 to 2 hours course with increasing level of expertise, from beginner to expert. | Python Scientific lecture notes Release 2010 EuroScipy tutorial team Editors Emmanuelle Gouillart Gael Varoquaux July 09 2010 Contents 1 Scientific computing why Python 1 The scientist s needs. 1 Specifications. 1 Existing solutions . 1 2 Building blocks of scientific computing with Python 3 3 A very short introduction to Python 6 First steps. 6 Basic types. 8 Control Flow. 14 Defining functions. 19 Reusing code scripts and modules . 25 Input and Output . 31 Standard Library. 32 Exceptions handling in Python . 37 Object-oriented programming OOP . 39 4 NumPy creating and manipulating numerical data 41 Creating NumPy data arrays . 41 Graphical data representation matplotlib and Mayavi . 42 Indexing . 45 Slicing . 46 Manipulating the shape of arrays . 48 Exercises some simple array creations . 49 Real data read write arrays from to files . 50 Simple mathematical and statistical operations on arrays . 53 Fancy indexing . 55 Broadcasting. 57 Synthesis exercises framing Lena. 61 5 Getting help and finding documentation 63 6 Matplotlib 67