Skip to content

Commit

Permalink
Rewrote a few sentences
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyod committed Jan 1, 2018
1 parent b976fbb commit f9b9e93
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions 03-anatomy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,9 @@ you don't need `X` nor `Y` afterwards, an alternate solution would be:
>>> np.multiply(Y, 2, out=Y)
>>> np.add(X, Y, out=X)
Using this alternate solution, no temporary array has been created. Problem is
that there are many other cases where such copies needs to be created and this
impact the performance like demonstrated on the example below:
Using this alternate solution, no temporary array has been created. The problem
is that there are many other cases where such copies need to be created and
this impacts the performance like demonstrated in the example below:
.. code:: pycon
Expand Down
4 changes: 2 additions & 2 deletions 04-code-vectorization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ dead. Every cell interacts with its eight neighbours, which are the cells that
are directly horizontally, vertically, or diagonally adjacent. At each step in
time, the following transitions occur:

1. Any live cell with fewer than two live neighbours dies, as if by needs
caused by underpopulation.
1. Any live cell with fewer than two live neighbours dies, as if by
underpopulation.
2. Any live cell with more than three live neighbours dies, as if by
overcrowding.
3. Any live cell with two or three live neighbours lives, unchanged, to the
Expand Down
6 changes: 3 additions & 3 deletions 05-problem-vectorization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ compute it only once:
result += X[i]*Ysum
return result
Not so bad, we have removed the inner loop, meaning with transform a
:math:`O(n^2)` complexity into :math:`O(n)` complexity. Using the same
approach, we can now write:
Not so bad, we have removed the inner loop, transforming :math:`O(n^2)`
complexity into :math:`O(n)` complexity. Using the same approach, we can now
write:

.. code:: python
Expand Down
4 changes: 2 additions & 2 deletions 06-custom-vectorization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ others) for the creation of a `TypedList` object.
whose __array__ method returns an array, or any (nested) sequence.
sizes: int or 1-D array
If `itemsize is an integer, N, the array will be divided
If `itemsize` is an integer, N, the array will be divided
into elements of size N. If such partition is not possible,
an error is raised.
If `itemsize` is 1-D array, the array will be divided into
If `itemsize` is a 1-D array, the array will be divided into
elements whose successive sizes will be picked from itemsize.
If the sum of itemsize values is different from array size,
an error is raised.
Expand Down
3 changes: 1 addition & 2 deletions 07-beyond-numpy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,7 @@ Glumpy

`Glumpy <http://glumpy.github.io>`_ is an OpenGL-based interactive
visualization library in Python. Its goal is to make it easy to create fast,
scalable, beautiful, interactive and dynamic visualizations. The main
documentation for the site is organized into a couple of sections:
scalable, beautiful, interactive and dynamic visualizations.


Conclusion
Expand Down

0 comments on commit f9b9e93

Please sign in to comment.