File: README.md

package info (click to toggle)
python-awkward 2.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,524 kB
  • sloc: python: 187,940; cpp: 33,928; sh: 432; makefile: 21; javascript: 8
file content (23 lines) | stat: -rw-r--r-- 679 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Pybind11 header-only example

This example demonstrates the use of pybind11 to build Awkward Arrays using `LayoutBuilder`
and return them to a Python caller. The important files are:
1. `demo.cpp` — an example C++ source file that builds an Awkward Array using `LayoutBuilder`,
   and declares a Python extension module.

The remaining files are associated with Python/CMake configuration, and are not an important part of this example.

## Usage

1. Install the library
    ```bash
    pip install .
    ```
2. Run the demo function and print the returned `ak.Array`
    ```python
    from demo import create_demo_array

    print(
        create_demo_array()
    )
    ```