Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 71 additions & 91 deletions docs/src/awkward.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@
"<pre>[[{x: 1.1, y: 2.2}, {x: 3.3, y: 4.4}],\n",
" [],\n",
" [{x: 5.5, y: 6.6}]]\n",
"----------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 80 B\n",
"--------------------------------------\n",
"type: 3 * var * Vector2D[\n",
" x: float64,\n",
" y: float64\n",
Expand Down Expand Up @@ -112,8 +110,6 @@
" [],\n",
" [8.59]]\n",
"-----------------------\n",
"backend: cpu\n",
"nbytes: 56 B\n",
"type: 3 * var * float64</pre>"
],
"text/plain": [
Expand Down Expand Up @@ -142,8 +138,6 @@
" [],\n",
" [0.876]]\n",
"-----------------------\n",
"backend: cpu\n",
"nbytes: 56 B\n",
"type: 3 * var * float64</pre>"
],
"text/plain": [
Expand Down Expand Up @@ -256,27 +250,25 @@
{
"data": {
"text/html": [
"<pre>[{px: -0.541, py: 0.714, pz: -0.983},\n",
" {px: 0.61, py: -0.48, pz: -0.0845},\n",
" {px: 0.929, py: 0.718, pz: 0.0935},\n",
" {px: 1.52, py: -1.39, pz: -0.0187},\n",
" {px: 0.675, py: 0.0216, pz: -1.12},\n",
" {px: 0.542, py: -0.524, pz: 0.586},\n",
" {px: 0.927, py: 0.476, pz: 0.602},\n",
" {px: 0.615, py: 1.23, pz: -0.59},\n",
" {px: -0.626, py: 0.072, pz: 0.136},\n",
" {px: 2.23, py: 1.05, pz: -0.355}]\n",
"--------------------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 240 B\n",
"<pre>[{px: 0.585, py: -1.23, pz: 0.198},\n",
" {px: 0.0287, py: 1.03, pz: 1.12},\n",
" {px: 0.348, py: 2.5, pz: 3.49},\n",
" {px: 0.27, py: 1.08, pz: 0.149},\n",
" {px: 0.715, py: 0.228, pz: -0.251},\n",
" {px: 0.0405, py: 0.79, pz: 1.39},\n",
" {px: -1.24, py: -0.574, pz: -0.312},\n",
" {px: 0.0892, py: -0.038, pz: -0.428},\n",
" {px: 1.1, py: -0.237, pz: 1.81},\n",
" {px: -0.849, py: -0.613, pz: -1.24}]\n",
"--------------------------------------\n",
"type: 10 * Momentum3D[\n",
" px: float64,\n",
" py: float64,\n",
" pz: float64\n",
"]</pre>"
],
"text/plain": [
"<MomentumArray3D [{px: -0.541, py: 0.714, ...}, ...] type='10 * Momentum3D[...'>"
"<MomentumArray3D [{px: 0.585, py: -1.23, ...}, ...] type='10 * Momentum3D[p...'>"
]
},
"execution_count": 7,
Expand All @@ -297,27 +289,25 @@
{
"data": {
"text/html": [
"<pre>[[{px: 0.73, py: 0.862, pz: -0.129}, {px: 0.746, py: 0.614, pz: ..., ...}],\n",
"<pre>[[],\n",
" [{px: -1.05, py: -2.07, pz: -0.611}, {px: 0.588, py: -0.826, ...}],\n",
" [{px: 0.167, py: -0.77, pz: -1.14}, {px: 0.649, py: -0.446, ...}],\n",
" [],\n",
" [{px: 0.493, py: -0.633, pz: -0.413}, {px: 0.836, py: -1.77, ...}],\n",
" [{px: -0.58, py: -0.586, pz: -0.513}, {...}, ..., {px: -0.201, py: 1.52, ...}],\n",
" [{px: -0.474, py: 1.6, pz: -0.1}, {px: 0.218, py: 0.155, pz: 0.834}],\n",
" [{px: -0.881, py: -0.183, pz: -0.725}, {px: -0.108, py: -0.889, ...}],\n",
" [{px: -1.77, py: 2.04, pz: 0.896}],\n",
" [{px: -1.08, py: -0.591, pz: -0.0674}, {px: -0.183, py: -0.289, ...}],\n",
" [{px: -1.08, py: -1.15, pz: 2.6}],\n",
" [{px: -0.419, py: -0.363, pz: -0.563}, {px: -2.48, py: -0.228, ...}]]\n",
"--------------------------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 544 B\n",
" [{px: 0.559, py: -0.517, pz: -1.25}],\n",
" [{px: 1.23, py: 0.333, pz: 2.27}],\n",
" [{px: 1.07, py: 1.52, pz: 1.41}, ..., {px: -0.263, py: -0.755, pz: 1.01}],\n",
" [{px: -0.0202, py: -0.264, pz: -0.905}],\n",
" [{px: -0.363, py: -0.737, pz: -0.0312}, ..., {px: 0.477, py: -0.00146, ...}],\n",
" [{px: -0.987, py: -0.703, pz: -0.414}]]\n",
"------------------------------------------------------------------------------\n",
"type: 10 * var * Momentum3D[\n",
" px: float64,\n",
" py: float64,\n",
" pz: float64\n",
"]</pre>"
],
"text/plain": [
"<MomentumArray3D [[{px: 0.73, py: 0.862, ...}, ...], ...] type='10 * var * ...'>"
"<MomentumArray3D [[], ..., [{px: -0.987, py: ..., ...}]] type='10 * var * M...'>"
]
},
"execution_count": 8,
Expand Down Expand Up @@ -346,23 +336,21 @@
{
"data": {
"text/html": [
"<pre>[[0.347, -1.32],\n",
"<pre>[[],\n",
" [-2.83, -2.44],\n",
" [-5.85, 0.928],\n",
" [],\n",
" [-0.035, -0.385],\n",
" [-0.0551, 0.194, 2.28, -2.86, -2.39],\n",
" [-0.173, -0.782],\n",
" [-0.807, 0.704],\n",
" [-0.128],\n",
" [-1.35, -0.446],\n",
" [0.945],\n",
" [-1.11, -5.58]]\n",
"--------------------------------------\n",
"backend: cpu\n",
"nbytes: 240 B\n",
" [0.596],\n",
" [3.46],\n",
" [-2.64, 0.215, 1.37, 0.445],\n",
" [0.395],\n",
" [-0.281, -2.01, 1.25],\n",
" [1.78]]\n",
"-----------------------------\n",
"type: 10 * var * float64</pre>"
],
"text/plain": [
"<Array [[0.347, -1.32], [], ..., [-1.11, -5.58]] type='10 * var * float64'>"
"<Array [[], [-2.83, -2.44], ..., [...], [1.78]] type='10 * var * float64'>"
]
},
"execution_count": 9,
Expand Down Expand Up @@ -392,16 +380,16 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[0.3470024410105361 -1.32262374856204 ]\n",
"[]\n",
"[-0.0350058354646221 -0.3845727581312185 ]\n",
"[-0.05513156034267678 0.1939866533163302 2.2806023784977056 -2.861051860111839 -2.3860250251022475 ]\n",
"[-0.17338156209593328 -0.7816799910864897 ]\n",
"[-0.8071770038569903 0.7044860439866077 ]\n",
"[-0.1279745100114199 ]\n",
"[-1.3483450919978617 -0.44626327125953613 ]\n",
"[0.9449043237160631 ]\n",
"[-1.1124522691465186 -5.579496184145224 ]\n"
"[-2.833228962677397 -2.440420426614325 ]\n",
"[-5.8533879315268695 0.9278622045448855 ]\n",
"[]\n",
"[0.5955225435577661 ]\n",
"[3.4581243277777727 ]\n",
"[-2.6409970055321192 0.21548192577104403 1.3710478554473153 0.4453391894898468 ]\n",
"[0.39535925961287455 ]\n",
"[-0.28085928194857784 -2.007933327389994 1.247929350704072 ]\n",
"[1.7841371709739775 ]\n"
]
}
],
Expand Down Expand Up @@ -446,7 +434,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"9.08 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)\n"
"5.6 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)\n"
]
}
],
Expand All @@ -470,7 +458,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"2.44 ms ± 20.2 μs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
"1.36 ms ± 12.6 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)\n"
]
}
],
Expand Down Expand Up @@ -551,10 +539,17 @@
"TwoVectorArray.ProjectionClass2D = TwoVectorArray # noqa: F821\n",
"TwoVectorArray.ProjectionClass3D = ThreeVectorArray # noqa: F821\n",
"TwoVectorArray.MomentumClass = TwoVectorArray # noqa: F821\n",
"# populate properties to the level of a record\n",
"TwoVectorRecord.ProjectionClass2D = TwoVectorRecord # noqa: F821\n",
"TwoVectorRecord.ProjectionClass3D = ThreeVectorRecord # noqa: F821\n",
"TwoVectorRecord.MomentumClass = TwoVectorRecord # noqa: F821\n",
"\n",
"ThreeVectorArray.ProjectionClass2D = TwoVectorArray # noqa: F821\n",
"ThreeVectorArray.ProjectionClass3D = ThreeVectorArray # noqa: F821\n",
"ThreeVectorArray.MomentumClass = ThreeVectorArray # noqa: F821"
"ThreeVectorArray.MomentumClass = ThreeVectorArray # noqa: F821\n",
"ThreeVectorRecord.ProjectionClass2D = TwoVectorRecord # noqa: F821\n",
"ThreeVectorRecord.ProjectionClass3D = ThreeVectorRecord # noqa: F821\n",
"ThreeVectorRecord.MomentumClass = ThreeVectorRecord # noqa: F821"
]
},
{
Expand All @@ -570,9 +565,7 @@
" [],\n",
" [{pt: 3, phi: 1.6}],\n",
" [{pt: 4, phi: 3.4}]]\n",
"------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 104 B\n",
"----------------------------------------\n",
"type: 4 * var * TwoVector[\n",
" pt: int64,\n",
" phi: float64\n",
Expand Down Expand Up @@ -620,9 +613,7 @@
" [],\n",
" [{rho: 6, phi: 1.6}],\n",
" [{rho: 8, phi: -2.88}]]\n",
"---------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 104 B\n",
"------------------------------------------\n",
"type: 4 * var * TwoVector[\n",
" rho: float64,\n",
" phi: float64\n",
Expand Down Expand Up @@ -678,7 +669,12 @@
"LorentzVectorArray.ProjectionClass2D = TwoVectorArray # noqa: F821\n",
"LorentzVectorArray.ProjectionClass3D = ThreeVectorArray # noqa: F821\n",
"LorentzVectorArray.ProjectionClass4D = LorentzVectorArray # noqa: F821\n",
"LorentzVectorArray.MomentumClass = LorentzVectorArray # noqa: F821"
"LorentzVectorArray.MomentumClass = LorentzVectorArray # noqa: F821\n",
"# populate properties to the level of a record\n",
"LorentzVectorRecord.ProjectionClass2D = TwoVectorRecord # noqa: F821\n",
"LorentzVectorRecord.ProjectionClass3D = ThreeVectorRecord # noqa: F821\n",
"LorentzVectorRecord.ProjectionClass4D = LorentzVectorRecord # noqa: F821\n",
"LorentzVectorRecord.MomentumClass = LorentzVectorRecord # noqa: F821"
]
},
{
Expand All @@ -694,9 +690,7 @@
" [],\n",
" [{pt: 3, eta: 1.6, phi: 0.5, energy: 52}],\n",
" [{pt: 4, eta: 3.4, phi: 0.6, energy: 60}]]\n",
"-----------------------------------------------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 168 B\n",
"-------------------------------------------------------------------\n",
"type: 4 * var * LorentzVector[\n",
" pt: int64,\n",
" eta: float64,\n",
Expand Down Expand Up @@ -740,9 +734,7 @@
" [],\n",
" [{rho: 1.5, phi: 0.5, eta: 1.6, t: 26}],\n",
" [{rho: 2, phi: 0.6, eta: 3.4, t: 30}]]\n",
"-----------------------------------------------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 168 B\n",
"------------------------------------------------------------------\n",
"type: 4 * var * LorentzVector[\n",
" rho: float64,\n",
" phi: float64,\n",
Expand Down Expand Up @@ -776,9 +768,7 @@
" [],\n",
" [{rho: 3, phi: 0.5}],\n",
" [{rho: 4, phi: 0.6}]]\n",
"-------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 104 B\n",
"------------------------------------------\n",
"type: 4 * var * TwoVector[\n",
" rho: int64,\n",
" phi: float64\n",
Expand Down Expand Up @@ -810,9 +800,7 @@
" [],\n",
" [{rho: 3, phi: 0.5, eta: 1.6}],\n",
" [{rho: 4, phi: 0.6, eta: 3.4}]]\n",
"---------------------------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 136 B\n",
"--------------------------------------------------------------\n",
"type: 4 * var * ThreeVector[\n",
" rho: int64,\n",
" phi: float64,\n",
Expand Down Expand Up @@ -874,9 +862,7 @@
" [],\n",
" [{rho: 6, phi: 0.5, eta: 1.6, t: 104}],\n",
" [{rho: 8, phi: 0.6, eta: 3.4, t: 120}]]\n",
"---------------------------------------------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 168 B\n",
"---------------------------------------------------------------------------\n",
"type: 4 * var * LorentzVector[\n",
" rho: float64,\n",
" phi: float64,\n",
Expand Down Expand Up @@ -910,9 +896,7 @@
" [],\n",
" [{rho: 6, phi: 0.5}],\n",
" [{rho: 8, phi: 0.6}]]\n",
"---------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 104 B\n",
"------------------------------------------\n",
"type: 4 * var * TwoVector[\n",
" rho: float64,\n",
" phi: float64\n",
Expand Down Expand Up @@ -964,9 +948,7 @@
" [],\n",
" [{rho: 6, phi: 0.5, eta: 1.6, t: 104}],\n",
" [{rho: 8, phi: 0.6, eta: 3.4, t: 120}]]\n",
"------------------------------------------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 168 B\n",
"---------------------------------------------------------------------------\n",
"type: 4 * var * Momentum4D[\n",
" rho: float64,\n",
" phi: float64,\n",
Expand Down Expand Up @@ -1000,9 +982,7 @@
" [],\n",
" [{rho: 6, phi: 0.5}],\n",
" [{rho: 8, phi: 0.6}]]\n",
"--------------------------------------------------------------\n",
"backend: cpu\n",
"nbytes: 104 B\n",
"------------------------------------------\n",
"type: 4 * var * Vector2D[\n",
" rho: float64,\n",
" phi: float64\n",
Expand Down Expand Up @@ -1038,7 +1018,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
"version": "3.11.5"
}
},
"nbformat": 4,
Expand Down