Registry / data / uproot3

uproot3

JSON →
library3.14.4pypypiunverified

Uproot 3 is a Python library designed for reading and writing ROOT files, a data format prevalent in high-energy physics, using pure Python and NumPy. It facilitates the conversion of ROOT data into familiar Python data structures like NumPy arrays. This version (3.x) is currently in maintenance mode, superseded by `uproot4`, and receives only critical bug fixes.

pip install uproot3
INSTALL
IMPORT
SIG · UPROOT3
U
uproot3
datapythonv3.14.4
Install
3.9s avg
Import
1423ms
Disk
93MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.14.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.905s · 93.1MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 3.9s · import 0.803s · 89MB
93MB installed
● package 93MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

uproot3
import uproot3
import uproot3

This quickstart demonstrates how to create a simple ROOT file, then open it and read data from specified branches using `uproot3`. It shows accessing a single branch directly and multiple branches via a tree object, converting them into NumPy arrays.

import uproot3 import numpy as np import os # Create a dummy ROOT file for demonstration purposes # In a real application, you would open an existing file filename = "my_dummy_data.root" with uproot3.recreate(filename) as file: file["tree"] = {"branch1": np.array([1, 2, 3, 4, 5]), "branch2": np.array([10.1, 20.2, 30.3, 40.4, 50.5])} # Open the ROOT file and read data from a specific branch with uproot3.open(filename) as file: branch_data = file["tree/branch1"].array() print(f"Data from branch1: {branch_data}") # Accessing multiple branches tree = file["tree"] branch2_data = tree.array("branch2") print(f"Data from branch2: {branch2_data}") # Clean up the dummy file os.remove(filename)
uproot3 --version
Debug
Known issues
deprecatedUproot 3.x is deprecated and in maintenance mode. The actively developed and recommended version is `uproot4`. New projects should use `uproot4` for better performance, features, and modern Python compatibility.
fix
Migrate to `uproot4` by installing `pip install uproot4` and updating your code to use `import uproot` (uproot4 reclaims the 'uproot' import name).
affects: All 3.x versions
breakingThe auxiliary package `uproot-methods` was renamed to `uproot3-methods` in Uproot 3.14.1 to avoid dependency conflicts, particularly with older `uproot` versions. Explicit imports from `uproot_methods` will cause a `ModuleNotFoundError`.
fix
Ensure `uproot3-methods` is installed (`pip install uproot3-methods`) and update any import statements from `import uproot_methods` to `import uproot3_methods`.
affects: >=3.14.1
gotchaUproot 3.x has specific Python version requirements (>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*) and is best supported on Python 3.5-3.8. While it may run on newer Python 3 versions, it is not actively tested or optimized for them, potentially leading to warnings or subtle incompatibilities.
fix
For Python 3.9 and newer, it is highly recommended to use `uproot4` instead. If `uproot3` is essential, consider using a Python environment between 3.5 and 3.8.
affects: >=3.9
gotchaVersions of Uproot 3 prior to 3.14.4 could produce numerous `FutureWarning` messages when used with NumPy 1.20 and later, due to internal API usage changes within NumPy.
fix
Upgrade to Uproot 3.14.4 or later to mitigate most NumPy 1.20 related warnings. For full compatibility with the latest NumPy versions, migrating to `uproot4` is recommended.
affects: <3.14.4
Upgrade
Version history
3.14.4latest on PyPI · released Feb 12, 2021
Audit
Dependencies
numpyrequiredFundamental for array manipulation and data representation as Uproot converts ROOT data into NumPy arrays.
uproot3-methodsrequiredProvides mix-in methods for awkward and jagged arrays, essential for handling complex ROOT data structures.
Agent activity
22 hits · last 30 days
node
18
OpenAI (training)
1
Resources
uproot3 — pip install uproot3 · libregistry