Commit db47de21 authored by gabrieldemarmiesse's avatar gabrieldemarmiesse

Some rephrasing.

parent eedf8d9c
...@@ -343,8 +343,9 @@ standard library. ...@@ -343,8 +343,9 @@ standard library.
.. note:: .. note::
Vector in C++ is a data structure which represents Vector in C++ is a data structure which implements a list or stack based
a `stack <https://en.wikipedia.org/wiki/Stack_(abstract_data_type)>`_. on a resizeable C array. It is similar to the Python ``array``
type in the ``array`` standard library module.
There is a method `reserve` available which will avoid copies if you know in advance There is a method `reserve` available which will avoid copies if you know in advance
how many elements you are going to put in the vector. For more details how many elements you are going to put in the vector. For more details
see `this page from cppreference <http://en.cppreference.com/w/cpp/container/vector>`_. see `this page from cppreference <http://en.cppreference.com/w/cpp/container/vector>`_.
...@@ -353,8 +354,8 @@ standard library. ...@@ -353,8 +354,8 @@ standard library.
:linenos: :linenos:
The first line is a compiler directive. It tells Cython to compile your code to C++. The first line is a compiler directive. It tells Cython to compile your code to C++.
This will enable the use of the C++ standard library. This will enable the use of C++ language features and the C++ standard library.
Note that this isn't possible to compile Cython code to C++ with `pyximport`. You Note that it isn't possible to compile Cython code to C++ with `pyximport`. You
should use a :file:`setup.py` or a notebook to run this example. should use a :file:`setup.py` or a notebook to run this example.
You can see that the API of a vector is similar to the API of a Python list, You can see that the API of a vector is similar to the API of a Python list,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment