Skip to content

Commit 6a7369b

Browse files
committed
added python installation
1 parent ba73a41 commit 6a7369b

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

matlab.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,4 +313,4 @@ When installing Matlab, a lot of the toolboxes that are available are unlikely t
313313

314314

315315

316-
##[R tutorial](https://github.com/csmsoftware/Programming-for-data-analysis-tutorial-Matlab-R-Python/blob/master/r.md)
316+
[R tutorial](https://github.com/csmsoftware/Programming-for-data-analysis-tutorial-Matlab-R-Python/blob/master/r.md)

programming-fundamentals.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ The definition of an object is a Class, and the instance of that Class is an obj
215215
An objects functions are known as 'methods' and the variables are known as 'properties'.
216216

217217
## Control characters
218-
Different languages use different 'control characters' for defining seperate regions of executable code.
218+
Different languages use different 'control characters' for defining logical blocks executable code, for example separating out conditionals, operators, and function definitions.
219219
In Matlab and R, some control characters used are the
220-
`{}()[]`. In Python, indentation is used to specify control characters.
220+
`{}()[]`. In Python, indentation and `:` is used to specify logical blocks.
221221

222222
## Accessing data from disk
223223
Persistent data is data which when your program finishes (or crashes), still exists on disk.
@@ -382,4 +382,4 @@ out what the hell was going on.
382382
Keeping your data and code organised well will help you 6 months down the line.
383383

384384

385-
- [Matlab tutorial](https://github.com/csmsoftware/Programming-for-data-analysis-tutorial-Matlab-R-Python/blob/master/matlab.md)
385+
[Matlab tutorial](https://github.com/csmsoftware/Programming-for-data-analysis-tutorial-Matlab-R-Python/blob/master/matlab.md)

python.md

+19-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ The situation is made more complicated by different versions (2.x vs 3.x), and d
1212
Generally use python3.x for new projects, and only use python2.7 if a project you are using does not support Python3.
1313

1414
### Windows installation
15-
- See Conda below
15+
- See Conda/Anaconda below.
1616

1717
### Mac installation
18+
19+
Python2.7 will be installed system-wide by default on MacOS. However you should install Python3 and use that for your new projects.
20+
1821
- Install [Homebrew](https://brew.sh/)
1922
Install python3 via homebrew:
2023
```
@@ -139,7 +142,21 @@ Notebooks can be saved as json and exported and imported by other users.
139142
- [plotly](https://plot.ly/) - Interactive charts.
140143
- [nPYc Toolbox](https://github.com/phenomecentre/nPYc-Toolbox) - NPC built toolbox for NMR and MS import, preprocessing, QC, and generating reports.
141144

145+
### Using Packages
146+
Once installed to your system-wide or virtualenv python kernel (using pip or conda), packages can be 'imported' and used in your python code.
147+
148+
```
149+
# python
150+
151+
import numpy as np
152+
153+
a = np.arange(15).reshape(3, 5)
154+
a.shape
155+
156+
# > (3,5)
157+
```
158+
142159
- [Numpy tutorial](https://docs.scipy.org/doc/numpy-1.15.1/user/quickstart.html)
143160

144161

145-
##[Main page](https://github.com/csmsoftware/Programming-for-data-analysis-tutorial-Matlab-R-Python/blob/master/README.md)
162+
[Main page](https://github.com/csmsoftware/Programming-for-data-analysis-tutorial-Matlab-R-Python/blob/master/README.md)

0 commit comments

Comments
 (0)