ROOT
v6-26
Reference Guide
Loading...
Searching...
No Matches
_tarray.pyzdoc
Go to the documentation of this file.
1
/**
2
\class TArray
3
\brief \parblock \endparblock
4
\htmlonly
5
<div class="pyrootbox">
6
\endhtmlonly
7
## PyROOT
8
9
When used from Python, the subclasses of TArray (TArrayC, TArrayS, TArrayI, TArrayL, TArrayF and TArrayD) benefit from the following extra features:
10
11
- Their size can be obtained with `len`, which is equivalent to TArray::GetSize():
12
\code{.py}
13
import ROOT
14
15
a = ROOT.TArrayD(2)
16
print(len(a)) # prints '2'
17
\endcode
18
19
- Their elements can be read and written with the `getitem` and `setitem` operators, respectively:
20
\code{.py}
21
a[0] = 0.2
22
a[1] = 1.7
23
print(a[0]) # prints '0.2'
24
\endcode
25
26
- They are iterable:
27
\code{.py}
28
for elem in a:
29
print(elem)
30
\endcode
31
\htmlonly
32
</div>
33
\endhtmlonly
34
*/
v626_TMP
pyzdoc
_tarray.pyzdoc
ROOT v6-26 - Reference Guide Generated on Mon Sep 11 2023 21:03:04 (GVA Time) using Doxygen 1.9.8