Python: An Introduction to Scientific Programming

I am learning the basics of Python and am putting notes together, these are still incomplete:


In these set of guides we will use the open-source Anaconda which is a Python distribution compiled for data scientists. It has the Spyder graphical user interface inbuilt as well as the numerical numpy, the fundamental package for scientific computing and matplotlib which is required for plotting.

Python Basics: 0 Order Indexing

Python uses 0 order indexing. When starting with Python (particularly if one is used to MATLAB). we need to spend a moment relearn how to count to get used to zero order indexing.

Python Basics Datatypes, Basic Maths and Basic Variables

In this guide we look at some of the fundamentals of core python such as datatypes. These are numerical – integers (whole numbers) and floats (numbers with a decimal point), strings (text input) and Boolean (logical – true or false). We also look at the assignment of variables and the use of elementary mathematics between scalars. Some basic functions are also introduced.

Scalars, Vectors and Matrices

In this guide we look further at some of the fundamentals of core python and examine numerical data in the form of a list. This list can be a scalar, vector, matrix, book or more complicated multi-dimensional array. We discuss some of the basics behind indexing and examining the dimensions of an array.

The IPython Console, the Variable Explorer and Python Scripts with Basic Custom Functions

A look into Spyder…

Numerical Python: NumPy (Basics)

This section looks at using the Numerical Python NumPy to create vectors and matrices of data. It looks at indexing of rows or columns from such data, which is of course a perquisite when it comes to plotting.

Numerical Python: Mathematical Operations

addition, subtraction,


covariance after plotting?

Introduction to Pandas



2D Line Plot Basics

2D Scatter Plot

Exponential Function

This is a basic example to create a vector, for use in a mathematical formula to find the value of the exponential. Indexing of a row and column are also practiced:




Curve Fitting

Differentiation and Integration

For Loop

find the 2nd max, 3rd max, 4th max and their location etc etc


Use geometric shapes, right angle triangles on a circle to show the sin, cos and tan waveforms.

Polar Plots