# Complex Newton

Note: extent=(-r,r,-r,r) option in imshow.

# Tartans for exploration of color and numpy fancy indexing

## Numpy boolean indexing

For the "mask: want patterns like this:

0 0 0 1 1 1 0 0 0 1 1 1 0 ...
1 0 0 0 1 1 1 0 0 0 1 1 1 ...
1 1 0 0 0 1 1 1 0 0 0 1 1 ...
1 1 1 0 0 0 1 1 1 0 0 0 1 ...
0 1 1 1 0 0 0 1 1 1 0 0 0 ...
0 0 1 1 1 0 0 0 1 1 1 0 0 ...
...


You requested threadcount details from The Scottish Register of Tartans website
for the Argyll Campbell tartan. The details are given below.

B4K4B36K40G36W8G36K40B34K6

Pallet:
B=2C4084BLUE;K=101010BLACK;G=005020MOD GREEN;W=E0E0E0WHITE;

Threadcount given over a half sett with full count at the pivots.

You may wish to refer to the threadcount guidance section


## Parsing the palette

### Dictionaries

d = {'apple':'round crispy fruit', 'banana':'long yellow fruit'}

d['apple']

'round crispy fruit'


dictionary comprehensions

### Conversion from hex strings to int

int('F8',16)


Exercise: make a color look-up table

### Regular expressions

a pattern-matching syntax

import re