|
4 | 4 |
|
5 | 5 | The full license is in the file LICENSE, distributed with this software. |
6 | 6 |
|
7 | | -Usage |
8 | | -===== |
9 | | - |
10 | 7 | Basic Usage |
11 | | ------------ |
| 8 | +=========== |
12 | 9 |
|
13 | 10 | Example 1: Use an algorithm of the C++ library on a numpy array inplace |
14 | | -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 11 | +----------------------------------------------------------------------- |
15 | 12 |
|
16 | 13 | **C++ code** |
17 | 14 |
|
@@ -58,7 +55,7 @@ Example 1: Use an algorithm of the C++ library on a numpy array inplace |
58 | 55 |
|
59 | 56 |
|
60 | 57 | Example 2: Create a universal function from a C++ scalar function |
61 | | -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 58 | +----------------------------------------------------------------- |
62 | 59 |
|
63 | 60 | **C++ code** |
64 | 61 |
|
@@ -105,52 +102,3 @@ Example 2: Create a universal function from a C++ scalar function |
105 | 102 | [-1.499227, 0.136731, 1.646979, 1.643002, 0.128456], |
106 | 103 | [-1.084323, -0.583843, 0.45342 , 1.073811, 0.706945]] |
107 | 104 |
|
108 | | -
|
109 | | -Getting started with xtensor-cookiecutter |
110 | | ------------------------------------------ |
111 | | - |
112 | | -`xtensor-cookiecutter`_ helps extension authors create Python extension modules making use of xtensor. |
113 | | - |
114 | | -It takes care of the initial work of generating a project skeleton with |
115 | | - |
116 | | -- A complete ``setup.py`` compiling the extension module |
117 | | -- A few examples included in the resulting project including |
118 | | - |
119 | | - - A universal function defined from C++ |
120 | | - - A function making use of an algorithm from the STL on a numpy array |
121 | | - - Unit tests |
122 | | - - The generation of the HTML documentation with sphinx |
123 | | - |
124 | | -Usage |
125 | | -^^^^^ |
126 | | - |
127 | | -Install cookiecutter_ |
128 | | - |
129 | | -.. code:: |
130 | | -
|
131 | | - pip install cookiecutter |
132 | | -
|
133 | | -After installing cookiecutter, use the xtensor-cookiecutter_: |
134 | | - |
135 | | -.. code:: |
136 | | -
|
137 | | - cookiecutter https://github.com/QuantStack/xtensor-cookiecutter.git |
138 | | -
|
139 | | -As xtensor-cookiecutter runs, you will be asked for basic information about |
140 | | -your custom extension project. You will be prompted for the following |
141 | | -information: |
142 | | - |
143 | | -- ``author_name``: your name or the name of your organization, |
144 | | -- ``author_email`` : your project's contact email, |
145 | | -- ``github_project_name``: name of the GitHub repository for your project, |
146 | | -- ``github_organization_name``: name of the GithHub organization for your project, |
147 | | -- ``python_package_name``: name of the Python package created by your extension, |
148 | | -- ``cpp_namespace``: name for the cpp namespace holding the implementation of your extension, |
149 | | -- ``project_short_description``: a short description for your project. |
150 | | - |
151 | | -This will produce a directory containing all the required content for a minimal extension |
152 | | -project making use of xtensor with all the required boilerplate for package management, |
153 | | -together with a few basic examples. |
154 | | - |
155 | | -.. _xtensor-cookicutter: https://github.com/QuantStack/xtensor-cookiecutter |
156 | | -.. _cookiecutter: https://github.com/audreyr/cookiecutter |
0 commit comments