File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 8
8
9
9
Python bindings for the xtensor _ C++ multi-dimensional array library.
10
10
11
+ Introduction
12
+ ------------
13
+
11
14
What are ``xtensor `` and ``xtensor-python ``?
12
15
13
16
- ``xtensor `` is a C++ library for multi-dimensional arrays enabling numpy-style broadcasting and lazy computing.
@@ -16,10 +19,13 @@ What are ``xtensor`` and ``xtensor-python``?
16
19
- C++ universal functions and broadcasting
17
20
- STL - compliant APIs.
18
21
22
+
23
+ The `numpy to xtensor cheat sheet `_ from the ``xtensor `` documentation shows how numpy APIs translate to C++ with ``xtensor ``.
24
+
19
25
The Python bindings for ``xtensor `` are based on the pybind11 _ C++ library, which enables seemless interoperability between C++ and Python.
20
26
21
- Introduction
22
- ------------
27
+ Enabling numpy arrays in your C++ libraries
28
+ -------------------------------------------
23
29
24
30
Instead of exposing new types to python, ``xtensor-python `` enables the use of NumPy _ data structures from C++ using Python's `Buffer Protocol `_.
25
31
@@ -70,6 +76,7 @@ This software is licensed under the BSD-3-Clause license. See the LICENSE file f
70
76
71
77
.. _NumPy : http://www.numpy.org
72
78
.. _`Buffer Protocol` : https://docs.python.org/3/c-api/buffer.html
79
+ .. _`numpy to xtensor cheat sheet` : http://xtensor.readthedocs.io/en/latest/numpy.html
73
80
.. _xtensor : https://github.com/QuantStack/xtensor
74
81
.. _pybind11 : https://github.com/pybind/pybind11
75
82
.. _xtensor-cookiecutter : https://github.com/QuantStack/xtensor-cookiecutter
You can’t perform that action at this time.
0 commit comments