Skip to main content

The interface between ROOT and NumPy

Project description

https://img.shields.io/pypi/v/root_numpy.svg https://travis-ci.org/rootpy/root_numpy.png https://coveralls.io/repos/rootpy/root_numpy/badge.svg?branch=master https://landscape.io/github/rootpy/root_numpy/master/landscape.svg?style=flat https://zenodo.org/badge/14091/rootpy/root_numpy.svg

root_numpy is a Python extension module that provides an efficient interface between ROOT and NumPy. root_numpy’s internals are compiled C++ and can therefore handle large amounts of data much faster than equivalent pure Python implementations.

With your ROOT data in NumPy form, make use of NumPy’s broad library, including fancy indexing, slicing, broadcasting, random sampling, sorting, shape transformations, linear algebra operations, and more. See this tutorial to get started. NumPy is the fundamental library of the scientific Python ecosystem. Using NumPy arrays opens up many new possibilities beyond what ROOT offers. Convert your TTrees into NumPy arrays and use SciPy for numerical integration and optimization, matplotlib for plotting, pandas for data analysis, statsmodels for statistical modelling, scikit-learn for machine learning, and perform quick exploratory analysis in a Jupyter notebook.

At the core of root_numpy are powerful and flexible functions for converting ROOT TTrees into structured NumPy arrays as well as converting NumPy arrays back into ROOT TTrees. root_numpy can convert branches of strings and basic types such as bool, int, float, double, etc. as well as variable-length and fixed-length multidimensional arrays and 1D or 2D vectors of basic types and strings. root_numpy can also create columns in the output array that are expressions involving the TTree branches similar to TTree::Draw().

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

root_numpy-4.6.0.tar.gz (503.0 kB view details)

Uploaded Source

File details

Details for the file root_numpy-4.6.0.tar.gz.

File metadata

  • Download URL: root_numpy-4.6.0.tar.gz
  • Upload date:
  • Size: 503.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for root_numpy-4.6.0.tar.gz
Algorithm Hash digest
SHA256 bd1af021312eb2eed8ca77add1e0ddc2e491b55caf8667a585c3421eec5b7173
MD5 b83c71c8b99bd86710e706fb6f1e9ba4
BLAKE2b-256 1242ccf32e4417c500db5eecf3ff51162320280961b43de74be807ea05a018e4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page