You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/PythonBindings.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,18 @@
1
1
# Python bindings
2
2
3
-
Currently there are no offical python support. The feature is planned. But nevertheless, you can use Etaler in Python via [ROOT](https://root.cern.ch) and it's automatic binding generation feature.
3
+
## PyEtaler
4
+
[PyEtaler](https://guthub.com/etaler/pyetaler) is the offical binding for Etaler. We try to keep the Python API as close to the C++ one as possible. So you can use the C++ document as the Python document. With that said, some functions are changed in the binding to make it more Pythonic.
4
5
5
-
## Example
6
+
```python
7
+
>>>from etaler import et
8
+
>>> et.ones([2, 2])
9
+
{{ 1, 1},
10
+
{ 1, 1}}
11
+
```
12
+
13
+
## ROOT
14
+
15
+
If cppyy is not avaliable to you for any reason. You can use Etaler in Python via [ROOT](https://root.cern.ch) and it's automatic binding generation feature.
6
16
7
17
```Python
8
18
# Load ROOT
@@ -35,16 +45,5 @@ print(t)
35
45
"""
36
46
{{ 1, 1},
37
47
{ 1, 1}}
38
-
39
48
"""
40
-
```
41
-
42
-
## PyEtaler
43
-
The offical Python binding - [PyEtaler](https://guthub.com/etaler/pyetaler) in currently work in progress. We recomment using ROOT to bind from Python before PyEtaler leaves WIP.
0 commit comments