{"id":23848,"library":"hepconvert","title":"hepconvert","description":"High Energy Physics file conversion package (ROOT, Parquet, etc.). Current version 1.4.0, requires Python >=3.9. Active development, monthly releases.","status":"active","version":"1.4.0","language":"python","source_language":"en","source_url":"https://github.com/scikit-hep/hepconvert","tags":["hep","physics","ROOT","parquet","conversion","scikit-hep"],"install":[{"cmd":"pip install hepconvert","lang":"bash","label":"pip"},{"cmd":"conda install -c conda-forge hepconvert","lang":"bash","label":"conda"}],"dependencies":[{"reason":"ROOT file I/O","package":"uproot","optional":false},{"reason":"array manipulation for HEP data","package":"awkward","optional":false},{"reason":"Parquet file support","package":"pyarrow","optional":false},{"reason":"numerical operations","package":"numpy","optional":false},{"reason":"histogram operations (for add_histograms)","package":"boost_histogram","optional":true}],"imports":[{"note":"hepconvert exposes functions at top level; no submodule needed.","wrong":"import hepconvert; hepconvert.convert_root_to_parquet()","symbol":"convert_root_to_parquet","correct":"from hepconvert import convert_root_to_parquet"},{"symbol":"convert_parquet_to_root","correct":"from hepconvert import convert_parquet_to_root"},{"symbol":"merge_root","correct":"from hepconvert import merge_root"},{"symbol":"merge_parquet","correct":"from hepconvert import merge_parquet"}],"quickstart":{"code":"from hepconvert import convert_root_to_parquet\nconvert_root_to_parquet(\"input.root\", \"output.parquet\", branches=[\"branch1\", \"branch2\"])","lang":"python","description":"Quickly convert a ROOT file to Parquet, selecting specific branches."},"warnings":[{"fix":"Explicitly pass branches=[...] to select only what you need.","message":"convert_root_to_parquet by default converts all branches; this can be slow for large files. Always specify 'branches' to slim selection.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to >=1.3.8 with: pip install --upgrade hepconvert","message":"merge_root can silently lose 100 entries when using entry-number size selection (fixed in 1.3.8). If using 1.3.6 or earlier, upgrade.","severity":"gotcha","affected_versions":"<1.3.8"},{"fix":"Use Python 3.9 or later.","message":"Python 3.8 support dropped in 1.4.0. The package now requires Python >=3.9.","severity":"deprecated","affected_versions":">=1.4.0"},{"fix":"Upgrade to >=1.4.0 or use Python API with correct types.","message":"CLI arguments for options like '--size' are case-sensitive and must match exactly. Mixing types (e.g., passing a string for an integer option) fails with unclear error in <1.4.0.","severity":"gotcha","affected_versions":"<1.4.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install hepconvert","cause":"Package not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'hepconvert'"},{"fix":"Ensure input data is flat or use awkward.flatten() before passing to hepconvert.","cause":"Using hepconvert functions with Awkward arrays that require flattening due to jagged branches.","error":"ValueError: The truth value of an array with more than one element is ambiguous"},{"fix":"Check branch names with: uproot.open('file.root').keys()","cause":"Specified branch does not exist in the ROOT file.","error":"KeyError: 'branch_name'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}