
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
You can install Vector with pip and conda.
pip install vector
Vector is a Python library for 2D and 3D spatial vectors, as well as 4D space-time vectors. It is especially intended for performing geometric calculations on arrays of vectors, rather than one vector at a time in a Python for loop.
Vector is part of the Scikit-HEP project, High Energy Physics (HEP) tools in Python.
Vectors may be expressed in any of these coordinate systems:
x
y
or polar rho
($\rho$) phi
($\phi$)z
, polar theta
($\theta$), or pseudorapidity eta
($\eta$)t
or proper time tau
($\tau$)in any combination. (That is, 4D vectors have 2×3×2 = 12 distinct coordinate systems.)
Vectors may be included in any of these data types:
Each of these "backends" provides the same suite of properties and methods, through a common "compute" library.
Finally, vectors come in two flavors:
pt
($p_T$, transverse momentum) for the azimuthal magnitude rho
($\rho$) and energy
and mass
for the Cartesian time t
and proper time tau
($\tau$).Names and coordinate conventions were chosen to align with ROOT's TLorentzVector and Math::LorentzVector, as well as scikit-hep/math, uproot-methods TLorentzVector, henryiii/hepvector, and coffea.nanoevents.methods.vector.
If you want to contribute to Vector, pull requests are welcome!
Please install the latest version of the main
branch from source or a fork:
git clone https://github.com/scikit-hep/vector.git
cd vector
pip install -e .
Refer to CONTRIBUTING.md for more.
Thanks goes to these wonderful people (emoji key):
Jim Pivarski 🚧 💻 📖 | Henry Schreiner 🚧 💻 📖 | Eduardo Rodrigues 🚧 💻 📖 | N!no 📖 | Peter Fackeldey 📖 | Luke Kreczko 💻 | Nicholas Smith 🤔 |
Jonas Eschle 🤔 |
This project follows the all-contributors specification. Contributions of any kind welcome! See CONTRIBUTING.md for information on setting up a development environment.
This library was primarily developed by Saransh Chopra, Henry Schreiner, Jim Pivarski, Eduardo Rodrigues, and Jonas Eschle.
Support for this work was provided by the National Science Foundation cooperative agreement OAC-1836650 and PHY-2323298 (IRIS-HEP) and OAC-1450377 (DIANA/HEP). Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.
FAQs
Vector classes and utilities
We found that vector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.