Skip to content

Commit fb4914e

Browse files
committed
return type instead of array
1 parent d987b41 commit fb4914e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

servicex_analysis_utils/file_peeking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def str_to_array(encoded_str):
289289
# Each tree becomes a record array with 1 entry (dict of branch arrays)
290290
reconstructed_data[treename] = ak.Array([branches])
291291

292-
return ak.Array(reconstructed_data)
292+
return ak.Array(reconstructed_data).type
293293

294294
def get_structure(dataset, array_out=False, **kwargs):
295295
"""

tests/test_file_peeking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,6 @@ def test_decoding_to_array(build_test_samples,array_out=True):
163163
result=file_peeking.str_to_array(encoded_result)
164164

165165
#Test type
166-
assert isinstance(result, ak.Array), "str_to_array does not return an awkward array"
166+
assert isinstance(result, ak.types.arraytype.ArrayType), "str_to_array does not return an awkward array type"
167167
expected_type_str="1 * {background: {branch1: var * float64, branch2: var * float64}, signal: {branch1: var * float64}}"
168-
assert str(result.type) == expected_type_str
168+
assert str(result) == expected_type_str

0 commit comments

Comments
 (0)