DOC: Fix format of basics.rst
Our documentation should follow the PEP-8 standard, but for historical reasons there are many formats that don't. We should fix them now.

This issue is to fix the format of `doc/source/basics.rst`. To find the errors, first is required to install a newer version of `flake8-rst`:
```
conda install -c conda-forge flake8-rst=0.5.0
```

Then, all the errors can be obtained with:
```
$ flake8-rst doc/source/basics.rst 
doc/source/basics.rst:309:10: E225 missing whitespace around operator
doc/source/basics.rst:6:4: E902 TokenError: EOF in multi-line statement
doc/source/basics.rst:152:28: E203 whitespace before ':'
doc/source/basics.rst:152:83: E501 line too long (80 > 79 characters)
doc/source/basics.rst:153:28: E203 whitespace before ':'
doc/source/basics.rst:153:83: E501 line too long (85 > 79 characters)
doc/source/basics.rst:154:30: E203 whitespace before ':'
doc/source/basics.rst:154:83: E501 line too long (83 > 79 characters)
doc/source/basics.rst:175:46: E231 missing whitespace after ','
doc/source/basics.rst:175:51: E231 missing whitespace after ','
doc/source/basics.rst:175:54: E231 missing whitespace after ','
doc/source/basics.rst:175:59: E231 missing whitespace after ','
doc/source/basics.rst:175:62: E231 missing whitespace after ','
doc/source/basics.rst:175:67: E231 missing whitespace after ','
doc/source/basics.rst:175:70: E231 missing whitespace after ','
doc/source/basics.rst:176:57: E231 missing whitespace after ','
doc/source/basics.rst:339:6: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:339:15: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:340:7: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:340:16: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:355:7: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:355:21: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:362:29: E231 missing whitespace after ':'
doc/source/basics.rst:363:29: E231 missing whitespace after ':'
doc/source/basics.rst:363:59: E231 missing whitespace after ','
doc/source/basics.rst:363:61: E231 missing whitespace after ','
doc/source/basics.rst:426:27: E203 whitespace before ':'
doc/source/basics.rst:427:27: E203 whitespace before ':'
doc/source/basics.rst:428:27: E203 whitespace before ':'
doc/source/basics.rst:429:27: E203 whitespace before ':'
doc/source/basics.rst:446:4: E731 do not assign a lambda expression, use a def
doc/source/basics.rst:549:17: E221 multiple spaces before operator
doc/source/basics.rst:566:84: E501 line too long (81 > 79 characters)
doc/source/basics.rst:622:40: E231 missing whitespace after ','
doc/source/basics.rst:622:57: E231 missing whitespace after ','
doc/source/basics.rst:622:61: E231 missing whitespace after ','
doc/source/basics.rst:751:4: E402 module level import not at top of file
doc/source/basics.rst:756:19: E251 unexpected spaces around keyword / parameter equals
doc/source/basics.rst:756:21: E251 unexpected spaces around keyword / parameter equals
doc/source/basics.rst:760:4: E124 closing bracket does not match visual indentation
doc/source/basics.rst:883:83: E501 line too long (86 > 79 characters)
doc/source/basics.rst:927:7: E111 indentation is not a multiple of four
doc/source/basics.rst:980:4: E402 module level import not at top of file
doc/source/basics.rst:1041:39: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:1048:41: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:1059:49: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:1067:50: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:1087:4: E731 do not assign a lambda expression, use a def
doc/source/basics.rst:1099:24: E203 whitespace before ':'
doc/source/basics.rst:1099:38: E203 whitespace before ':'
doc/source/basics.rst:1115:4: E402 module level import not at top of file
doc/source/basics.rst:1124:36: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:1152:15: E126 continuation line over-indented for hanging indent
doc/source/basics.rst:1152:27: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:1152:37: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:1162:4: E731 do not assign a lambda expression, use a def
doc/source/basics.rst:1162:23: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:1162:34: E226 missing whitespace around arithmetic operator
doc/source/basics.rst:1164:32: E251 unexpected spaces around keyword / parameter equals
doc/source/basics.rst:1164:34: E251 unexpected spaces around keyword / parameter equals
doc/source/basics.rst:1164:43: E231 missing whitespace after ','
doc/source/basics.rst:1166:16: E231 missing whitespace after ','
doc/source/basics.rst:1166:18: E231 missing whitespace after ','
doc/source/basics.rst:1172:28: E201 whitespace after '['
doc/source/basics.rst:1172:47: E231 missing whitespace after ','
doc/source/basics.rst:1172:49: E231 missing whitespace after ','
doc/source/basics.rst:1173:28: E128 continuation line under-indented for visual indent
doc/source/basics.rst:1173:54: E202 whitespace before ']'
doc/source/basics.rst:1175:16: E231 missing whitespace after ','
doc/source/basics.rst:1175:18: E231 missing whitespace after ','
doc/source/basics.rst:1505:38: E203 whitespace before ':'
doc/source/basics.rst:1505:67: E203 whitespace before ':'
doc/source/basics.rst:1628:34: E231 missing whitespace after ','
doc/source/basics.rst:1679:14: E225 missing whitespace around operator
doc/source/basics.rst:1775:28: E203 whitespace before ':'
doc/source/basics.rst:1775:83: E501 line too long (80 > 79 characters)
doc/source/basics.rst:1776:28: E203 whitespace before ':'
doc/source/basics.rst:1776:83: E501 line too long (85 > 79 characters)
doc/source/basics.rst:1777:30: E203 whitespace before ':'
doc/source/basics.rst:1777:83: E501 line too long (83 > 79 characters)
doc/source/basics.rst:1803:29: E231 missing whitespace after ':'
doc/source/basics.rst:1803:32: E231 missing whitespace after ','
doc/source/basics.rst:1803:34: E231 missing whitespace after ','
doc/source/basics.rst:1803:36: E231 missing whitespace after ','
doc/source/basics.rst:1803:39: E231 missing whitespace after ','
doc/source/basics.rst:1803:45: E231 missing whitespace after ':'
doc/source/basics.rst:1803:48: E231 missing whitespace after ','
doc/source/basics.rst:1803:50: E231 missing whitespace after ','
doc/source/basics.rst:1803:52: E231 missing whitespace after ','
doc/source/basics.rst:1803:55: E231 missing whitespace after ','
doc/source/basics.rst:1803:63: E231 missing whitespace after ':'
doc/source/basics.rst:1803:66: E231 missing whitespace after ','
doc/source/basics.rst:1803:68: E231 missing whitespace after ','
doc/source/basics.rst:1803:70: E231 missing whitespace after ','
doc/source/basics.rst:1810:54: E231 missing whitespace after ','
doc/source/basics.rst:1913:49: E231 missing whitespace after ','
doc/source/basics.rst:1913:56: E231 missing whitespace after ','
doc/source/basics.rst:1913:61: E231 missing whitespace after ','
doc/source/basics.rst:1913:68: E231 missing whitespace after ','
doc/source/basics.rst:1913:73: E231 missing whitespace after ','
doc/source/basics.rst:1913:83: E501 line too long (80 > 79 characters)
doc/source/basics.rst:1914:27: E231 missing whitespace after ','
doc/source/basics.rst:1986:5: E999 SyntaxError: invalid syntax
doc/source/basics.rst:2010:83: E501 line too long (85 > 79 characters)
doc/source/basics.rst:2124:85: E501 line too long (83 > 79 characters)
doc/source/basics.rst:2212:84: E501 line too long (81 > 79 characters)
```

After fixing this issue, the previous command should not report any error.