-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add support for Long64_t (#2023)
* fix: add test * test: column of a Long64_t type * test: check form of an output ak array * fix: specialize type_to_name
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE | ||
|
||
import numpy as np # noqa: F401 | ||
import pytest | ||
|
||
import awkward as ak | ||
import awkward._connect.cling | ||
import awkward._lookup | ||
|
||
ROOT = pytest.importorskip("ROOT") | ||
|
||
|
||
compiler = ROOT.gInterpreter.Declare | ||
|
||
|
||
def test_rdf_column_of_Long64_t_type(): | ||
data_frame = ROOT.RDataFrame(10).Define("x", "(Long64_t)(gRandom->Rndm()*1000.)") | ||
assert data_frame.GetColumnType("x") == "Long64_t" | ||
|
||
ak_array = ak.from_rdataframe( | ||
data_frame, | ||
columns="x", | ||
) | ||
assert ak_array.layout.form == ak.forms.NumpyForm("int64") |