from-python-to-numpy
from-python-to-numpy copied to clipboard
An open-access book on numpy vectorization techniques, Nicolas P. Rougier, 2017
Hi! ``` Z = base[6:2:-1, 5::-1] find_index(base, Z) ``` produces an exception `TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'` The problem is here, in line 43 https://github.com/rougier/from-python-to-numpy/blob/eb21651fc84d132414603e5a16d93f54ef45ec99/code/find_index.py#L41-L45 We've...
Hi as I am a French speaker, and a native English speaker (British). The following phrasing from chapter 3.4 “As a conclusion, we'll make an exercise. Given…” should read “In...
Is there a printable version of the book? Thanks
As promised in https://github.com/rougier/from-python-to-numpy/issues/95 , I am proposing a jupyter-book version of the book. To generate the jupyter-book, I added a `_config.yml` and `_toc.yml` files. Then it is relatively straightforward...
Hi, Just to let you know that I forked this repository, to work on a [jupyter-book](https://jupyterbook.org) version [[here](https://github.com/lhoupert/from-python-to-numpy/tree/jb-version)] It is currently a work in progress, I encountered an issue with...
I was reading the Introduction of the book and I found myself trying to understand why `random_walk_faster` is ~7 times faster than `random_walk`. That's a huge difference! Those are the...
In the `compute_neighbours()` function, I think you meant to do `N = [[0,]*(shape[1]) for i in range(shape[0])]` instead of `N = [[0,]*(shape[0]) for i in range(shape[1])]`
Is there any proper way to translate this book to other language? I would like to do that in Korean whenever I have some free time :)
This is great stuff. https://www.labri.fr/perso/nrougier/from-python-to-numpy/#memory-layout you wrote "...Said differently, an array is mostly a contiguous block of memory..." Why would you the word "mostly". Is it because OS might allocate...
Hi, sorry I'm not 100% sure this is the right place to suggest that, but the following code can result a little unclear because you reference a variable `index` which...