ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 17.04.2021

Просмотров: 3718

Скачиваний: 3

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.
background image

Introduction to Python for Science, Release 0.9.23

C.2 Books

There are a lot of books on Python and there is no way I can provide reviews for all of
them. I have found that the book by Mark Lutz,

Learning Python

, published by O’Reilly

Media does the trick for most people. It doesn’t have anything special for scientific pro-
gramming, and thus does not cover the NumPy, SciPy, or MatPlotLib packages, but for
just about everything else, it’s an excellent resource. It gives a good introduction to object
oriented programming, or OOP, which I say little about in this text. The 3rd edition of
the book covers Python 2 while the 4th and 5th (current) editions cover Python 3. You
are probably better off getting the latest edition as everybody will soon be using Python
3. If you are using Python 2, as we do in this text, you can easily enough figure out the
differences between Python 3 and 2.

C.2. Books

195


background image

Introduction to Python for Science, Release 0.9.23

196

Appendix C. Python Resources


background image

INDEX

array (NumPy),

29

printing,

61

assignment operator,

17

Canopy

Code Editor,

20

installing Python,

179

IPython pane,

6

tab completion,

20

window,

5

conditionals,

99

applied to arrays,

119

curve fitting,

140

linear,

130

exponential function,

141

power law function,

146

power-law function,

146

with weighting,

133

nonlinear,

146

dictionary,

29

,

46

functions

arguments

**kwargs,

122

*args,

122

keyword,

121

positional,

121

variable number,

122

fast array processing,

119

looping over arrays,

117

NumPy,

16

positional arguments,

122

user defined,

115

input,

55

keyboard,

55

reading data from a file,

62

installing Python

Canopy,

179

Spyder,

179

IPython

Canopy IPython pane,

6

IPython Notebook,

181

magic commands,

8

magic functions,

7

navigation commands,

7

system shell commands,

9

tab completion,

9

list,

29

,

30

list comprehension,

110

,

148

logical operators,

104

loops,

105

for loops,

105

while loops,

107

magic functions

IPython,

7

masked arrays,

85

197


background image

Introduction to Python for Science, Release 0.9.23

MatPlotLib

module,

14

MatPlotLib functions

ayhline, axhline,

79

figure,

79

legend,

79

plot,

79

savefig,

79

show,

79

tight_layout,

90

xlabel, ylabel,

79

module

importing,

24

MatPlotLib,

14

NumPy,

14

SciPy,

14

NumPy

array,

35

functions,

16

module,

14

output,

55

screen,

57

writing data to a file,

66

plots,

73

basic,

75

error bars,

81

interactive,

74

line and symbol specifiers,

80

log-log,

91

logarithmic axes,

89

masked arrays,

85

semi-log,

89

setting axis limits,

83

subplots,

87

programs,

20

Python

installing,

179

module,

14

random numbers,

48

reserved words,

19

roots of equations,

see

solving non-linear

equations

SciPy

module,

14

scripts,

20

solving non-linear equations,

165

Bisection method,

169

Brent method,

166

Newton-Raphson method,

169

Ridder method,

169

systems of nonlinear equations,

169

Spyder

installing Python,

179

string,

29

strings,

30

tab completion

Canopy,

20

IPython,

9

variable,

17

variable names,

19

198

Index