Vector
Vector: JIT-compilable mathematical manipulations of ragged Lorentz vectors - Published in JOSS (2025)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 8 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
✓Committers with academic emails
4 of 25 committers (16.0%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Repository
Vector classes and utilities
Basic Info
- Host: GitHub
- Owner: scikit-hep
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Homepage: https://vector.readthedocs.io
- Size: 1.81 MB
Statistics
- Stars: 93
- Watchers: 10
- Forks: 31
- Open Issues: 27
- Releases: 27
Topics
Metadata Files
README.md
Vector: arrays of 2D, 3D, and Lorentz vectors
Installation
You can install Vector with pip and conda.
bash
pip install vector
Introduction
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.
Coordinate systems
Vectors may be expressed in any of these coordinate systems:
- the azimuthal plane may be Cartesian
xyor polarrho($\rho$)phi($\phi$) - the longitudinal axis may be Cartesian
z, polartheta($\theta$), or pseudorapidityeta($\eta$) - the temporal component for space-time vectors may be Cartesian
tor proper timetau($\tau$)
in any combination. (That is, 4D vectors have 2×3×2 = 12 distinct coordinate systems.)
Backends
Vectors may be included in any of these data types:
- vector.obj objects (pure Python)
- NumPy structured arrays of vectors
- Awkward Arrays of vectors (possibly within variable-length lists or nested record structures)
- SymPy expressions for symbolic (non-numeric) manipulations
- In Numba-compiled functions, with vector.obj objects or Awkward Arrays
Each of these "backends" provides the same suite of properties and methods, through a common "compute" library.
Geometric versus momentum
Finally, vectors come in two flavors:
- geometric: only one name for each property or method
- momentum: same property or method can be accessed with several synonyms, such as
pt($p_T$, transverse momentum) for the azimuthal magnituderho($\rho$) andenergyandmassfor the Cartesian timetand proper timetau($\tau$).
Familiar conventions
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.
Getting help
- Source code on GitHub: scikit-hep/vector
- Report bugs and request features on the GitHub Issues page
- Ask questions on the GitHub Discussions page
- Real-time chat on Gitter: Scikit-HEP/Vector
Contributing to 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:
bash
git clone https://github.com/scikit-hep/vector.git
cd vector
pip install -e .
Refer to CONTRIBUTING.md for more.
Citing Vector
bib
@article{Chopra2025,
doi = {10.21105/joss.07791},
url = {https://doi.org/10.21105/joss.07791},
year = {2025}, publisher = {The Open Journal},
volume = {10},
number = {109},
pages = {7791},
author = {Saransh Chopra and Henry Schreiner and Eduardo Rodrigues and Jonas Eschle and Jim Pivarski},
title = {Vector: JIT-compilable mathematical manipulations of ragged Lorentz vectors},
journal = {Journal of Open Source Software}
}
Documentation
Tutorials
- Vector objects
- NumPy arrays of vectors
- Awkward Arrays of vectors
- Compiling functions on vectors with Numba
- Vector expressions with SymPy
Vector constructors
- Making vector objects
- Making NumPy arrays of vectors
- Making Awkward Arrays of vectors
- Making SymPy vector expressions
Vector functions
- Interface for all vectors
- Interface for 2D vectors
- Interface for 3D vectors
- Interface for 4D vectors
- Interface for 2D momentum
- Interface for 3D momentum
- Interface for 4D momentum
More ways to learn
Contributors
Thanks goes to these wonderful people (emoji key):
Jim Pivarski 🚧 💻 📖 |
Henry Schreiner 🚧 💻 📖 |
Eduardo Rodrigues 🚧 💻 📖 |
N!no 📖 |
Peter Fackeldey 📖 |
Luke Kreczko 💻 |
Nicholas Smith 🤔 |
Jonas Eschle 🤔 |
Saransh Chopra 🚧 💻 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome! See CONTRIBUTING.md for information on setting up a development environment.
Acknowledgements
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.
Owner
- Name: Scikit-HEP Project
- Login: scikit-hep
- Kind: organization
- Email: scikit-hep-forum@googlegroups.com
- Website: https://scikit-hep.org
- Repositories: 46
- Profile: https://github.com/scikit-hep
A community project for High Energy Physics data analysis in Python
JOSS Publication
Vector: JIT-compilable mathematical manipulations of ragged Lorentz vectors
Authors
Tags
vector algebra high energy physicsCitation (CITATION.cff)
cff-version: "1.2.0"
authors:
- family-names: Chopra
given-names: Saransh
orcid: "https://orcid.org/0000-0003-3046-7675"
- family-names: Schreiner
given-names: Henry
orcid: "https://orcid.org/0000-0002-7833-783X"
- family-names: Rodrigues
given-names: Eduardo
orcid: "https://orcid.org/0000-0003-2846-7625"
- family-names: Eschle
given-names: Jonas
orcid: "https://orcid.org/0000-0002-7312-3699"
- family-names: Pivarski
given-names: Jim
orcid: "https://orcid.org/0000-0002-6649-343X"
contact:
- family-names: Pivarski
given-names: Jim
orcid: "https://orcid.org/0000-0002-6649-343X"
doi: 10.5281/zenodo.15263860
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Chopra
given-names: Saransh
orcid: "https://orcid.org/0000-0003-3046-7675"
- family-names: Schreiner
given-names: Henry
orcid: "https://orcid.org/0000-0002-7833-783X"
- family-names: Rodrigues
given-names: Eduardo
orcid: "https://orcid.org/0000-0003-2846-7625"
- family-names: Eschle
given-names: Jonas
orcid: "https://orcid.org/0000-0002-7312-3699"
- family-names: Pivarski
given-names: Jim
orcid: "https://orcid.org/0000-0002-6649-343X"
date-published: 2025-05-23
doi: 10.21105/joss.07791
issn: 2475-9066
issue: 109
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 7791
title: "Vector: JIT-compilable mathematical manipulations of ragged
Lorentz vectors"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.07791"
volume: 10
title: "Vector: JIT-compilable mathematical manipulations of ragged
Lorentz vectors"
Papers & Mentions
Total mentions: 2
Elevated Heart Rate is Associated with Cardiac Denervation in Patients with Heart Failure: A 123-Iodine-MIBG Myocardial Scintigraphy Study
- DOI: 10.5935/abc.20160166
- OpenAlex ID: https://openalex.org/W2539596466
- Published: January 2016
Genome-wide comparative analysis of DNA methylation between soybean cytoplasmic male-sterile line NJCMS5A and its maintainer NJCMS5B
- DOI: 10.1186/s12864-017-3962-5
- OpenAlex ID: https://openalex.org/W2745008316
- Published: August 2017
GitHub Events
Total
- Create event: 60
- Release event: 3
- Issues event: 33
- Watch event: 13
- Delete event: 62
- Member event: 1
- Issue comment event: 93
- Push event: 153
- Pull request review event: 97
- Pull request review comment event: 44
- Pull request event: 152
- Fork event: 6
Last Year
- Create event: 60
- Release event: 3
- Issues event: 33
- Watch event: 13
- Delete event: 62
- Member event: 1
- Issue comment event: 93
- Push event: 153
- Pull request review event: 97
- Pull request review comment event: 44
- Pull request event: 152
- Fork event: 6
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| pre-commit-ci[bot] | 6****] | 175 |
| Saransh Chopra | s****1@g****m | 98 |
| Henry Schreiner | h****r@c****h | 80 |
| dependabot[bot] | 4****] | 58 |
| Jim Pivarski | j****i | 38 |
| eduardo-rodrigues | e****s@c****h | 6 |
| Peter Fackeldey | f****r@g****m | 4 |
| Aditi Juneja | 9****a | 3 |
| Matthew Feickert | m****t@c****h | 3 |
| Naman Priyadarshi | 7****i | 3 |
| Florian Bruggisser | f****n@b****h | 2 |
| Angus Hollands | g****5@g****m | 1 |
| Ankush Chudiwal | 1****8 | 1 |
| Benjamin Fischer | b****s@c****h | 1 |
| David Pérez-Suárez | d****o@g****m | 1 |
| Frantic Rabbit | 1****t | 1 |
| HP (Hetav) | 6****5 | 1 |
| Luke Kreczko | l****o@g****m | 1 |
| Michael Eliachevitch | m****h@p****e | 1 |
| N!no | n****l@g****m | 1 |
| Raymond Ehlers | r****s@g****m | 1 |
| Sinclert Pérez | S****t@h****m | 1 |
| The Gitter Badger | b****r@g****m | 1 |
| Yogendra Sharma | E****a@g****m | 1 |
| p-mishra1 | 8****1 | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 65
- Total pull requests: 422
- Average time to close issues: 5 months
- Average time to close pull requests: 5 days
- Total issue authors: 26
- Total pull request authors: 21
- Average comments per issue: 1.91
- Average comments per pull request: 1.05
- Merged pull requests: 375
- Bot issues: 2
- Bot pull requests: 237
Past Year
- Issues: 22
- Pull requests: 144
- Average time to close issues: about 1 month
- Average time to close pull requests: 4 days
- Issue authors: 14
- Pull request authors: 13
- Average comments per issue: 1.55
- Average comments per pull request: 0.52
- Merged pull requests: 123
- Bot issues: 1
- Bot pull requests: 90
Top Authors
Issue Authors
- Saransh-cpp (28)
- jpivarski (6)
- simonthor (3)
- agoose77 (2)
- ikrommyd (2)
- acampove (2)
- masonproffitt (2)
- pre-commit-ci[bot] (1)
- veprbl (1)
- matthewfeickert (1)
- jpata (1)
- lgray (1)
- denehoffman (1)
- Superharz (1)
- nhartman94 (1)
Pull Request Authors
- pre-commit-ci[bot] (182)
- Saransh-cpp (143)
- dependabot[bot] (82)
- Schefflera-Arboricola (10)
- henryiii (10)
- pfackeldey (8)
- jpivarski (6)
- Ankush1oo8 (4)
- matthewfeickert (3)
- kyleniemeyer (2)
- allcontributors[bot] (2)
- pandyah5 (2)
- Yogendra0Sharma (2)
- Naman-Priyadarshi (2)
- meliache (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- pypi 588,877 last-month
- Total docker downloads: 386
-
Total dependent packages: 19
(may contain duplicates) -
Total dependent repositories: 55
(may contain duplicates) - Total versions: 50
- Total maintainers: 4
pypi.org: vector
Vector classes and utilities
- Homepage: https://github.com/scikit-hep/vector
- Documentation: https://vector.readthedocs.io/
- License: BSD License
-
Latest release: 1.6.3
published 5 months ago
Rankings
Maintainers (3)
spack.io: py-vector
Vector classes and utilities
- Homepage: https://github.com/scikit-hep/vector
- License: []
-
Latest release: 1.6.3
published 4 months ago
Rankings
Maintainers (1)
conda-forge.org: vector
- Homepage: https://github.com/scikit-hep/vector
- License: BSD-3-Clause
-
Latest release: 0.10.0
published over 3 years ago
Rankings
Dependencies
- importlib-metadata >=0.22; python_version < "3.8"
- numpy >=1.13.3
- packaging >=19
- typing-extensions python_version < "3.8"
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/upload-artifact v3 composite
- pypa/gh-action-pypi-publish v1.6.4 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3.1.1 composite
- pre-commit/action v3.0.0 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- jupyterlab >=1.2
- nb_conda_kernels
- numba >=0.50
- numpy >=1.13.3
- pip >=18
- pytest >=6
- root >=6.18.04
