|
| 1 | +Preface |
| 2 | +=============================================================================== |
| 3 | + |
| 4 | +.. contents:: **Contents** |
| 5 | + :local: |
| 6 | + |
| 7 | + |
| 8 | +About the author |
| 9 | +---------------- |
| 10 | + |
| 11 | +`Nicolas P. Rougier`_ is a full-time research scientist at Inria_ which is the |
| 12 | +French national institute for research in computer science and control. This is |
| 13 | +a public scientific and technological establishment (EPST) under the double |
| 14 | +supervision of the Research & Education Ministry, and the Ministry of Economy |
| 15 | +Finance and Industry. Nicolas P. Rougier is working within the Mnemosyne_ |
| 16 | +project which lies at the frontier between integrative and computational |
| 17 | +neuroscience in association with the `Institute of Neurodegenerative |
| 18 | +Diseases`_, the Bordeaux laboratory for research in computer science |
| 19 | +(LaBRI_), the `University of Bordeaux`_ and the national center for scientific |
| 20 | +research (CNRS_). |
| 21 | + |
| 22 | +He has been using Python for more than 15 years and NumPy for more than 10 |
| 23 | +years for modeling in neuroscience, machine learning and for advanced |
| 24 | +visualization (OpenGL). Nicolas P. Rougier is the author of several online |
| 25 | +resources and tutorials (Matplotlib, NumPy, OpenGL) and he's teaching Python, |
| 26 | +NumPy and scientific visualization at the University of Bordeaux and in various |
| 27 | +conferences and schools worldwide (SciPy, EuroScipy, etc). He's also the author |
| 28 | +of the popular article `Ten Simple Rules for Better Figures`_ and a popular |
| 29 | +`matplotlib tutorial |
| 30 | +<http://www.labri.fr/perso/nrougier/teaching/matplotlib/matplotlib.html>`_. |
| 31 | + |
| 32 | + |
| 33 | +About this book |
| 34 | +--------------- |
| 35 | + |
| 36 | +This book has been written in |ReST|_ format and generated using the |
| 37 | +`rst2html.py` command line available from the docutils_ python package. |
| 38 | + |
| 39 | +If you want to rebuild the html output, from the top directory, type: |
| 40 | + |
| 41 | +.. code-block:: |
| 42 | +
|
| 43 | + $ rst2html.py --link-stylesheet --cloak-email-addresses \ |
| 44 | + --toc-top-backlinks --stylesheet=book.css \ |
| 45 | + --stylesheet-dirs=. book.rst book.html |
| 46 | +
|
| 47 | +The sources are available from https://github.com/rougier/from-python-to-numpy. |
| 48 | + |
| 49 | +.. |ReST| replace:: restructured text |
| 50 | +.. _ReST: http://docutils.sourceforge.net/rst.html |
| 51 | +.. _docutils: http://docutils.sourceforge.net/ |
| 52 | + |
| 53 | + |
| 54 | +About the Jupyter Book |
| 55 | +++++++++++++++++++++++ |
| 56 | + |
| 57 | +**html version** |
| 58 | + |
| 59 | +To generate the `Jupyter Book`_ from the top directory: |
| 60 | + |
| 61 | +1. Install the most up to date version of jupyter-book: |
| 62 | + |
| 63 | +.. code-block:: |
| 64 | +
|
| 65 | + $ pip install -U jupyter-book |
| 66 | + |
| 67 | +2. Go to the root directory of the repository and run: |
| 68 | + |
| 69 | +.. code-block:: |
| 70 | +
|
| 71 | + $ jupyter-book build . --path-output jupyter-book/. |
| 72 | +
|
| 73 | +3. Copy the data folder into the html directory: |
| 74 | + |
| 75 | +.. code-block:: |
| 76 | +
|
| 77 | + $ cp -r data jupyter-book/_build/html/. |
| 78 | +
|
| 79 | +4. Open Jupyter-book at: `jupyter-book/_build/html/index.html` |
| 80 | + |
| 81 | + |
| 82 | +**pdf version** |
| 83 | + |
| 84 | +To generate a pdf versio
67F4
n of the book, you will need pyppeteer_ installed, |
| 85 | +then in the top directory, run: |
| 86 | + |
| 87 | +.. code-block:: |
| 88 | +
|
| 89 | + $ jupyter-book build . --builder pdfhtml --path-output jupyter-book/. |
| 90 | +
|
| 91 | +The pdf version of the book is available at `jupyter-book/_build/pdf/book.pdf` |
| 92 | + |
| 93 | +.. _Jupyter Book: https://jupyterbook.org |
| 94 | +.. _pyppeteer: https://pypi.org/project/pyppeteer/ |
| 95 | + |
| 96 | + |
| 97 | +Prerequisites |
| 98 | ++++++++++++++ |
| 99 | + |
| 100 | +This is not a Python beginner guide and you should have an intermediate level in |
| 101 | +Python and ideally a beginner level in NumPy. If this is not the case, have |
| 102 | +a look at the bibliography_ for a curated list of resources. |
| 103 | + |
| 104 | + |
| 105 | +Conventions |
| 106 | ++++++++++++ |
| 107 | + |
| 108 | +We will use usual naming conventions. If not stated explicitly, each script |
| 109 | +should import NumPy, scipy and matplotlib as: |
| 110 | + |
| 111 | +.. code-block:: python |
| 112 | + |
| 113 | + import numpy as np |
| 114 | + import scipy as sp |
| 115 | + import matplotlib.pyplot as plt |
| 116 | +
|
| 117 | +
|
| 118 | +We'll use up-to-date versions (at the date of writing, i.e. January, 2017) of the |
| 119 | +different packages: |
| 120 | + |
| 121 | +=========== ========= |
| 122 | +Packages Version |
| 123 | +=========== ========= |
| 124 | +Python 3.6.0 |
| 125 | +----------- --------- |
| 126 | +NumPy 1.12.0 |
| 127 | +----------- --------- |
| 128 | +Scipy 0.18.1 |
| 129 | +----------- --------- |
| 130 | +Matplotlib 2.0.0 |
| 131 | +=========== ========= |
| 132 | + |
| 133 | +How to contribute |
| 134 | ++++++++++++++++++ |
| 135 | + |
| 136 | +If you want to contribute to this book, you can: |
| 137 | + |
| 138 | +* Review chapters (please contact me) |
| 139 | +* Report issues (https://github.com/rougier/from-python-to-numpy/issues) |
| 140 | +* Suggest improvements (https://github.com/rougier/from-python-to-numpy/pulls) |
| 141 | +* Correct English (https://github.com/rougier/from-python-to-numpy/issues) |
| 142 | +* Design a better and more responsive html template for the book. |
| 143 | +* Star the project (https://github.com/rougier/from-python-to-numpy) |
| 144 | + |
| 145 | +Publishing |
| 146 | +++++++++++ |
| 147 | + |
| 148 | +If you're an editor interested in publishing this book, you can `contact me |
| 149 | +<mailto:Nicolas.Rougier@inria.fr>`_ if you agree to have this version and all |
| 150 | +subsequent versions open access (i.e. online at `this address |
| 151 | +<http://www.labri.fr/perso/nrougier/from-python-to-numpy>`_), you know how to |
| 152 | +deal with `restructured text <http://docutils.sourceforge.net/rst.html>`_ (Word |
| 153 | +is not an option), you provide a real added-value as well as supporting |
| 154 | +services, and more importantly, you have a truly amazing latex book template |
| 155 | +(and be warned that I'm a bit picky about typography & design: `Edward Tufte |
| 156 | +<https://www.edwardtufte.com/tufte/>`_ is my hero). Still here? |
| 157 | + |
| 158 | + |
| 159 | +License |
| 160 | +-------- |
| 161 | + |
| 162 | +**Book** |
| 163 | + |
| 164 | +This work is licensed under a `Creative Commons Attribution-Non Commercial-Share |
| 165 | +Alike 4.0 International License <https://creativecommons.org/licenses/by-nc-sa/4.0/>`_. You are free to: |
| 166 | + |
| 167 | +* **Share** — copy and redistribute the material in any medium or format |
| 168 | +* **Adapt** — remix, transform, and build upon the material |
| 169 | + |
| 170 | +The licensor cannot revoke these freedoms as long as you follow the license terms. |
| 171 | + |
| 172 | +**Code** |
| 173 | + |
| 174 | +The code is licensed under the `OSI-approved BSD 2-Clause License |
| 175 | +<LICENSE-code.txt>`_. |
| 176 | + |
| 177 | + |
| 178 | +.. --- Links ------------------------------------------------------------------ |
| 179 | +.. _Nicolas P. Rougier: http://www.labri.fr/perso/nrougier/ |
| 180 | +.. _Inria: http://www.inria.fr/en |
| 181 | +.. _Mnemosyne: http://www.inria.fr/en/teams/mnemosyne |
| 182 | +.. _LaBRI: https://www.labri.fr/ |
| 183 | +.. _CNRS: http://www.cnrs.fr/index.php |
| 184 | +.. _University of Bordeaux: http://www.u-bordeaux.com/ |
| 185 | +.. _Institute of Neurodegenerative Diseases: |
| 186 | + http://www.imn-bordeaux.org/en/ |
| 187 | +.. _Ten Simple Rules for Better Figures: |
| 188 | + http://dx.doi.org/10.1371/journal.pcbi.1003833 |
| 189 | +.. ---------------------------------------------------------------------------- |
| 190 | +
|
0 commit comments