| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9b52975 commit b5792e9
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,5 +8,7 @@ API reference | |||
| 8 | 8 | ============= | |
| 9 | 9 | ||
| 10 | 10 | .. toctree:: | |
| 11 | + :maxdepth: 2 | ||
| 11 | 12 | ||
| 12 | 13 | pyarray | |
| 14 | + pytensor | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,15 +21,17 @@ Example 1: Use an algorithm of the C++ library on a numpy array inplace | |||
| 21 | 21 | ||
| 22 | 22 | double sum_of_sines(xt::pyarray<double> &m) | |
| 23 | 23 | { | |
| 24 | - auto sines = xt::sin(m); // sines does not actually hold any value, which are only computed upon access | ||
| 24 | + auto sines = xt::sin(m); | ||
| 25 | + // sines does not actually hold any value, which are only computed upon access | ||
| 25 | 26 | return std::accumulate(sines.begin(), sines.end(), 0.0); | |
| 26 | 27 | } | |
| 27 | 28 | ||
| 28 | 29 | PYBIND11_PLUGIN(xtensor_python_test) | |
| 29 | 30 | { | |
| 30 | 31 | pybind11::module m("xtensor_python_test", "Test module for xtensor python bindings"); | |
| 31 | 32 | ||
| 32 | - m.def("sum_of_sines", sum_of_sines, "Computes the sum of the sines of the values of the input array"); | ||
| 33 | + m.def("sum_of_sines", sum_of_sines, | ||
| 34 | + "Computes the sum of the sines of the values of the input array"); | ||
| 33 | 35 | ||
| 34 | 36 | return m.ptr(); | |
| 35 | 37 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,7 +28,7 @@ Install cookiecutter_ | |||
| 28 | 28 | ||
| 29 | 29 | pip install cookiecutter | |
| 30 | 30 | ||
| 31 | - After installing cookiecutter, use the xtensor-cookiecutter_: | ||
| 31 | + After installing cookiecutter, use the xtensor_cookiecutter_: | ||
| 32 | 32 | ||
| 33 | 33 | .. code:: | |
| 34 | 34 | ||
@@ -50,5 +50,5 @@ This will produce a directory containing all the required content for a minimal | |||
| 50 | 50 | project making use of xtensor with all the required boilerplate for package management, | |
| 51 | 51 | together with a few basic examples. | |
| 52 | 52 | ||
| 53 | - .. _xtensor-cookicutter: https://github.com/QuantStack/xtensor-cookiecutter | ||
| 53 | + .. _xtensor_cookicutter: https://github.com/QuantStack/xtensor-cookiecutter | ||
| 54 | 54 | .. _cookiecutter: https://github.com/audreyr/cookiecutter | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,6 +63,11 @@ This software is licensed under the BSD-3-Clause license. See the LICENSE file f | |||
| 63 | 63 | ||
| 64 | 64 | api_reference | |
| 65 | 65 | ||
| 66 | + .. toctree:: | ||
| 67 | + :caption: DEVELOPER ZONE | ||
| 68 | + | ||
| 69 | + releasing | ||
| 70 | + | ||
| 66 | 71 | .. _NumPy: http://www.numpy.org | |
| 67 | 72 | .. _`Buffer Protocol`: https://docs.python.org/3/c-api/buffer.html | |
| 68 | 73 | .. _xtensor: https://github.com/QuantStack/xtensor | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,12 @@ | |||
| 1 | + .. Copyright (c) 2016, Johan Mabille and Sylvain Corlay | ||
| 2 | + | ||
| 3 | + Distributed under the terms of the BSD 3-Clause License. | ||
| 4 | + | ||
| 5 | + The full license is in the file LICENSE, distributed with this software. | ||
| 6 | + | ||
| 7 | + pytensor | ||
| 8 | + ======== | ||
| 9 | + | ||
| 10 | + .. doxygenclass:: xt::pytensor | ||
| 11 | + :project: xtensor-python | ||
| 12 | + :members: | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,30 @@ | |||
| 1 | + .. Copyright (c) 2016, Johan Mabille and Sylvain Corlay | ||
| 2 | + | ||
| 3 | + Distributed under the terms of the BSD 3-Clause License. | ||
| 4 | + | ||
| 5 | + The full license is in the file LICENSE, distributed with this software. | ||
| 6 | + | ||
| 7 | + Releasing xtensor-python | ||
| 8 | + ======================== | ||
| 9 | + | ||
| 10 | + Releasing a new version | ||
| 11 | + ----------------------- | ||
| 12 | + | ||
| 13 | + From the master branch of xtensor-python | ||
| 14 | + | ||
| 15 | + - Make sure that you are in sync with the master branch of the upstream remote. | ||
| 16 | + - In file ``xtensor_python_config.hpp``, set the macros for ``XTENSOR_PYTHON_VERSION_MAJOR``, ``XTENSOR_PYTHON_VERSION_MINOR`` and ``XTENSOR_PYTHON_VERSION_PATCH`` to the desired values. | ||
| 17 | + - Update the readme file w.r.t. dependencies on xtensor and pybind11. | ||
| 18 | + - Stage the changes (``git add``), commit the changes (``git commit``) and add a tag of the form ``Major.minor.patch``. It is important to not add any other content to the tag name. | ||
| 19 | + - Push the new commit and tag to the main repository. (``git push``, and ``git push --tags``) | ||
| 20 | + | ||
| 21 | + Updating the conda-forge recipe | ||
| 22 | + ------------------------------- | ||
| 23 | + | ||
| 24 | + xtensor-python has been packaged for the conda package manager. Once the new tag has been pushed on GitHub, edit the conda-forge recipe for xtensor in the following fashion: | ||
| 25 | + | ||
| 26 | + - Update the version number to the new Major.minor.patch. | ||
| 27 | + - Set the build number to 0. | ||
| 28 | + - Update the hash of the source tarball. | ||
| 29 | + - Check for the versions of the dependencies. | ||
| 30 | + - Optionally, rerender the conda-forge feedstock. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments