Skip to content

Commit 820844d

Browse files
committed
Numpy to xtensor cheat sheet
1 parent d3b4523 commit 820844d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/source/index.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
Python bindings for the xtensor_ C++ multi-dimensional array library.
1010

11+
Introduction
12+
------------
13+
1114
What are ``xtensor`` and ``xtensor-python``?
1215

1316
- ``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``?
1619
- C++ universal functions and broadcasting
1720
- STL - compliant APIs.
1821

22+
23+
The `numpy to xtensor cheat sheet`_ from the ``xtensor`` documentation shows how numpy APIs translate to C++ with ``xtensor``.
24+
1925
The Python bindings for ``xtensor`` are based on the pybind11_ C++ library, which enables seemless interoperability between C++ and Python.
2026

21-
Introduction
22-
------------
27+
Enabling numpy arrays in your C++ libraries
28+
-------------------------------------------
2329

2430
Instead of exposing new types to python, ``xtensor-python`` enables the use of NumPy_ data structures from C++ using Python's `Buffer Protocol`_.
2531

@@ -70,6 +76,7 @@ This software is licensed under the BSD-3-Clause license. See the LICENSE file f
7076

7177
.. _NumPy: http://www.numpy.org
7278
.. _`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
7380
.. _xtensor: https://github.com/QuantStack/xtensor
7481
.. _pybind11: https://github.com/pybind/pybind11
7582
.. _xtensor-cookiecutter: https://github.com/QuantStack/xtensor-cookiecutter

0 commit comments

Comments
 (0)