vector 1.1.1__tar.gz → 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vector-1.1.1 → vector-1.2.0}/.github/CONTRIBUTING.md +3 -3
- {vector-1.1.1 → vector-1.2.0}/.github/PULL_REQUEST_TEMPLATE.md +1 -1
- {vector-1.1.1 → vector-1.2.0}/.github/dependabot.yml +5 -1
- {vector-1.1.1 → vector-1.2.0}/.github/workflows/cd.yml +2 -2
- {vector-1.1.1 → vector-1.2.0}/.github/workflows/ci.yml +19 -8
- {vector-1.1.1 → vector-1.2.0}/.github/workflows/notebooks.yml +1 -1
- {vector-1.1.1 → vector-1.2.0}/.pre-commit-config.yaml +8 -12
- {vector-1.1.1 → vector-1.2.0}/PKG-INFO +60 -7
- {vector-1.1.1 → vector-1.2.0}/README.md +53 -3
- vector-1.2.0/docs/api/backends/vector.backends.awkward_constructors.rst +8 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/backends/vector.backends.rst +1 -0
- {vector-1.1.1 → vector-1.2.0}/docs/changelog.md +42 -1
- {vector-1.1.1 → vector-1.2.0}/docs/index.rst +1 -1
- {vector-1.1.1 → vector-1.2.0}/docs/usage/intro.ipynb +668 -294
- {vector-1.1.1 → vector-1.2.0}/noxfile.py +2 -2
- {vector-1.1.1 → vector-1.2.0}/pyproject.toml +64 -66
- {vector-1.1.1 → vector-1.2.0}/src/vector/__init__.py +1 -1
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/is_antiparallel.py +1 -3
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/is_parallel.py +1 -3
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/is_perpendicular.py +1 -3
- {vector-1.1.1 → vector-1.2.0}/src/vector/_methods.py +65 -0
- vector-1.2.0/src/vector/_version.py +16 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/backends/_numba_object.py +43 -44
- {vector-1.1.1 → vector-1.2.0}/src/vector/backends/awkward.py +18 -17
- {vector-1.1.1 → vector-1.2.0}/src/vector/backends/numpy.py +26 -14
- {vector-1.1.1 → vector-1.2.0}/src/vector/backends/object.py +6 -11
- {vector-1.1.1 → vector-1.2.0}/tests/backends/test_awkward.py +98 -0
- {vector-1.1.1 → vector-1.2.0}/tests/backends/test_numpy.py +118 -0
- {vector-1.1.1 → vector-1.2.0}/tests/backends/test_object.py +38 -0
- {vector-1.1.1 → vector-1.2.0}/tests/backends/test_operators.py +1 -3
- vector-1.2.0/tests/test_methods.py +184 -0
- vector-1.1.1/src/vector/_version.py +0 -4
- vector-1.1.1/tests/test_methods.py +0 -19
- {vector-1.1.1 → vector-1.2.0}/.all-contributorsrc +0 -0
- {vector-1.1.1 → vector-1.2.0}/.git_archival.txt +0 -0
- {vector-1.1.1 → vector-1.2.0}/.gitattributes +0 -0
- {vector-1.1.1 → vector-1.2.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {vector-1.1.1 → vector-1.2.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {vector-1.1.1 → vector-1.2.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {vector-1.1.1 → vector-1.2.0}/.github/codecov.yml +0 -0
- {vector-1.1.1 → vector-1.2.0}/.github/matchers/pylint.json +0 -0
- {vector-1.1.1 → vector-1.2.0}/.gitignore +0 -0
- {vector-1.1.1 → vector-1.2.0}/.readthedocs.yml +0 -0
- {vector-1.1.1 → vector-1.2.0}/CITATION.cff +0 -0
- {vector-1.1.1 → vector-1.2.0}/LICENSE +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/Makefile +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/_images/LogoSrc.svg +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/_images/vector-logo.png +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/backends/vector.backends._numba.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/backends/vector.backends._numba_object.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/backends/vector.backends.awkward.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/backends/vector.backends.numba_numpy.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/backends/vector.backends.numpy.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/backends/vector.backends.object.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.Et.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.Et2.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.Mt.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.Mt2.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.add.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.beta.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.boostX_beta.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.boostX_gamma.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.boostY_beta.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.boostY_gamma.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.boostZ_beta.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.boostZ_gamma.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.boost_beta3.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.boost_p4.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.deltaRapidityPhi.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.deltaRapidityPhi2.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.dot.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.equal.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.gamma.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.is_lightlike.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.is_spacelike.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.is_timelike.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.isclose.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.not_equal.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.rapidity.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.scale.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.subtract.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.t.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.t2.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.tau.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.tau2.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.to_beta3.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.transform4D.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/lorentz/vector._compute.lorentz.unit.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.add.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.deltaphi.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.dot.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.equal.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.is_antiparallel.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.is_parallel.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.is_perpendicular.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.isclose.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.not_equal.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.phi.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.rho.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.rho2.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.rotateZ.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.scale.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.subtract.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.transform2D.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.unit.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.x.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/planar/vector._compute.planar.y.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.add.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.costheta.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.cottheta.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.cross.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.deltaR.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.deltaR2.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.deltaangle.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.deltaeta.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.dot.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.equal.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.eta.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.is_antiparallel.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.is_parallel.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.is_perpendicular.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.isclose.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.mag.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.mag2.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.not_equal.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.rotateX.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.rotateY.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.rotate_axis.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.rotate_euler.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.rotate_quaternion.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.scale.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.subtract.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.theta.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.transform3D.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.unit.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/spatial/vector._compute.spatial.z.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/compute/vector._compute.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/inheritance.svg +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/modules.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/vector._methods.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/vector._typeutils.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/api/vector.rst +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/conf.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/make.bat +0 -0
- {vector-1.1.1 → vector-1.2.0}/docs/usage/structure.md +0 -0
- {vector-1.1.1 → vector-1.2.0}/environment.yml +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/__init__.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/Et.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/Et2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/Mt.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/Mt2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/__init__.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/add.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/beta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/boostX_beta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/boostX_gamma.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/boostY_beta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/boostY_gamma.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/boostZ_beta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/boostZ_gamma.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/boost_beta3.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/boost_p4.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/deltaRapidityPhi.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/deltaRapidityPhi2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/dot.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/equal.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/gamma.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/is_lightlike.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/is_spacelike.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/is_timelike.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/isclose.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/not_equal.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/rapidity.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/scale.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/subtract.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/t.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/t2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/tau.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/tau2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/to_beta3.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/transform4D.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/lorentz/unit.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/__init__.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/add.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/deltaphi.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/dot.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/equal.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/is_antiparallel.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/is_parallel.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/is_perpendicular.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/isclose.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/not_equal.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/phi.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/rho.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/rho2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/rotateZ.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/scale.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/subtract.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/transform2D.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/unit.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/x.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/planar/y.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/__init__.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/add.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/costheta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/cottheta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/cross.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/deltaR.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/deltaR2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/deltaangle.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/deltaeta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/dot.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/equal.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/eta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/isclose.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/mag.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/mag2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/not_equal.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/rotateX.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/rotateY.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/rotate_axis.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/rotate_euler.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/rotate_quaternion.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/scale.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/subtract.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/theta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/transform3D.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/unit.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_compute/spatial/z.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/_typeutils.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/backends/__init__.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/backends/_numba.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/backends/awkward_constructors.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/backends/numba_numpy.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/py.typed +0 -0
- {vector-1.1.1 → vector-1.2.0}/src/vector/version.pyi +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/__init__.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/backends/__init__.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/backends/test_awkward_numba.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/backends/test_numba_numpy.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/backends/test_numba_object.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/__init__.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/__init__.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_Et.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_Et2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_Mt.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_Mt2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_beta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_boostX_beta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_boostX_gamma.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_boostY_beta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_boostY_gamma.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_boostZ_beta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_boostZ_gamma.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_boost_beta3.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_boost_p4.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_deltaRapidityPhi.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_deltaRapidityPhi2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_gamma.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_rapidity.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_t.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_t2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_tau.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_tau2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/lorentz/test_to_beta3.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/planar/__init__.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/planar/test_deltaphi.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/planar/test_phi.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/planar/test_rho.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/planar/test_rho2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/planar/test_rotateZ.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/planar/test_x.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/planar/test_y.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/__init__.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_costheta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_cottheta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_cross.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_deltaR.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_deltaR2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_deltaangle.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_deltaeta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_eta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_mag.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_mag2.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_rotateX.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_rotateY.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_rotate_axis.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_rotate_euler.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_rotate_quaternion.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_theta.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/spatial/test_z.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/test_add.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/test_conversions.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/test_dot.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/test_equal.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/test_isclose.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/test_not_equal.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/test_scale.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/test_subtract.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/compute/test_unit.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/samples/issue-161-v2.pkl +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/samples/issue-161.pkl +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/test_compute_features.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/test_issues.py +0 -0
- {vector-1.1.1 → vector-1.2.0}/tests/test_notebooks.py +0 -0
|
@@ -94,7 +94,7 @@ If you would like to skip the failing checks and push the code for further discu
|
|
|
94
94
|
|
|
95
95
|
## Testing vector
|
|
96
96
|
|
|
97
|
-
`vector` is tested using `pytest` and `
|
|
97
|
+
`vector` is tested using `pytest` and `pytest-doctestplus`. `pytest` is responsible for testing the code, whose configuration is available in [pyproject.toml](https://github.com/scikit-hep/vector/blob/main/pyproject.toml).`pytest-doctestplus` is responsible for testing the examples available in every docstring, which prevents them from going stale. Additionally, `vector` also uses `pytest-cov` to calculate the coverage of these unit tests.
|
|
98
98
|
|
|
99
99
|
### Running tests locally
|
|
100
100
|
|
|
@@ -119,13 +119,13 @@ python -m pytest --cov=vector tests/
|
|
|
119
119
|
The doctests can be executed using the `test` dependencies of `vector` in the following way -
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
|
-
|
|
122
|
+
python -m pytest --doctest-plus src/vector/
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
or, one can run the doctests along with the unit tests in the following way -
|
|
126
126
|
|
|
127
127
|
```bash
|
|
128
|
-
python -m pytest --
|
|
128
|
+
python -m pytest --doctest-plus .
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
A much more detailed guide on testing with `pytest` for `Scikit-HEP` packages is available [here](https://scikit-hep.org/developer/pytest).
|
|
@@ -11,7 +11,7 @@ _Please describe the purpose of this pull request. Reference and link to any rel
|
|
|
11
11
|
- [ ] Does your submission pass pre-commit? (`$ pre-commit run --all-files` or `$ nox -s lint`)
|
|
12
12
|
- [ ] Does your submission pass tests? (`$ pytest` or `$ nox -s tests`)
|
|
13
13
|
- [ ] Does the documentation build with your changes? (`$ cd docs; make clean; make html` or `$ nox -s docs`)
|
|
14
|
-
- [ ] Does your submission pass the doctests? (`$
|
|
14
|
+
- [ ] Does your submission pass the doctests? (`$ pytest --doctest-plus src/vector/` or `$ nox -s doctests`)
|
|
15
15
|
|
|
16
16
|
## Before Merging
|
|
17
17
|
|
|
@@ -17,7 +17,7 @@ jobs:
|
|
|
17
17
|
- name: Build SDist and wheel
|
|
18
18
|
run: pipx run build
|
|
19
19
|
|
|
20
|
-
- uses: actions/upload-artifact@
|
|
20
|
+
- uses: actions/upload-artifact@v4
|
|
21
21
|
with:
|
|
22
22
|
path: dist/*
|
|
23
23
|
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
id-token: write
|
|
36
36
|
|
|
37
37
|
steps:
|
|
38
|
-
- uses: actions/download-artifact@
|
|
38
|
+
- uses: actions/download-artifact@v4
|
|
39
39
|
with:
|
|
40
40
|
name: artifact
|
|
41
41
|
path: dist
|
|
@@ -20,7 +20,7 @@ jobs:
|
|
|
20
20
|
name: Check SDist
|
|
21
21
|
steps:
|
|
22
22
|
- uses: actions/checkout@v4
|
|
23
|
-
- uses: actions/setup-python@
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
24
|
with:
|
|
25
25
|
python-version: 3.x
|
|
26
26
|
- uses: pre-commit/action@v3.0.0
|
|
@@ -39,11 +39,12 @@ jobs:
|
|
|
39
39
|
- "3.9"
|
|
40
40
|
- "3.10"
|
|
41
41
|
- "3.11"
|
|
42
|
+
- "3.12"
|
|
42
43
|
name: Python ${{ matrix.python-version }} - Light
|
|
43
44
|
steps:
|
|
44
45
|
- uses: actions/checkout@v4
|
|
45
46
|
|
|
46
|
-
- uses: actions/setup-python@
|
|
47
|
+
- uses: actions/setup-python@v5
|
|
47
48
|
with:
|
|
48
49
|
python-version: ${{ matrix.python-version }}
|
|
49
50
|
|
|
@@ -67,11 +68,12 @@ jobs:
|
|
|
67
68
|
- "3.9"
|
|
68
69
|
- "3.10"
|
|
69
70
|
- "3.11"
|
|
71
|
+
- "3.12"
|
|
70
72
|
name: Python ${{ matrix.python-version }} - Awkward v1
|
|
71
73
|
steps:
|
|
72
74
|
- uses: actions/checkout@v4
|
|
73
75
|
|
|
74
|
-
- uses: actions/setup-python@
|
|
76
|
+
- uses: actions/setup-python@v5
|
|
75
77
|
with:
|
|
76
78
|
python-version: ${{ matrix.python-version }}
|
|
77
79
|
|
|
@@ -84,8 +86,12 @@ jobs:
|
|
|
84
86
|
- name: Install awkward v1
|
|
85
87
|
run: python -m pip install -U "awkward<2"
|
|
86
88
|
|
|
89
|
+
- name: Run doctests on Python 3.11 with awkward v1.x
|
|
90
|
+
if: matrix.python-version == '3.11'
|
|
91
|
+
run: python -m pytest -ra --doctest-plus src/vector/
|
|
92
|
+
|
|
87
93
|
- name: Test package with awkward v1.x
|
|
88
|
-
run: python -m pytest -ra --cov=vector --
|
|
94
|
+
run: python -m pytest -ra --cov=vector --ignore tests/test_notebooks.py .
|
|
89
95
|
|
|
90
96
|
check-awkward-v2:
|
|
91
97
|
needs: [check-light]
|
|
@@ -98,11 +104,12 @@ jobs:
|
|
|
98
104
|
- "3.9"
|
|
99
105
|
- "3.10"
|
|
100
106
|
- "3.11"
|
|
107
|
+
- "3.12"
|
|
101
108
|
name: Python ${{ matrix.python-version }} - Awkward v2
|
|
102
109
|
steps:
|
|
103
110
|
- uses: actions/checkout@v4
|
|
104
111
|
|
|
105
|
-
- uses: actions/setup-python@
|
|
112
|
+
- uses: actions/setup-python@v5
|
|
106
113
|
with:
|
|
107
114
|
python-version: ${{ matrix.python-version }}
|
|
108
115
|
|
|
@@ -115,11 +122,15 @@ jobs:
|
|
|
115
122
|
- name: Install awkward v2
|
|
116
123
|
run: python -m pip install -U --pre "awkward>=2.0.0rc1"
|
|
117
124
|
|
|
125
|
+
- name: Run doctests on Python 3.11 with awkward v2.x
|
|
126
|
+
if: matrix.python-version == 3.11
|
|
127
|
+
run: python -m pytest -ra --doctest-plus src/vector/
|
|
128
|
+
|
|
118
129
|
- name: Test package with awkward v2.x
|
|
119
|
-
run: python -m pytest -ra --cov=vector --
|
|
130
|
+
run: python -m pytest -ra --cov=vector --ignore tests/test_notebooks.py .
|
|
120
131
|
|
|
121
132
|
- name: Upload coverage report
|
|
122
|
-
uses: codecov/codecov-action@v3.1.
|
|
133
|
+
uses: codecov/codecov-action@v3.1.5
|
|
123
134
|
|
|
124
135
|
discheck:
|
|
125
136
|
runs-on: ubuntu-latest
|
|
@@ -127,7 +138,7 @@ jobs:
|
|
|
127
138
|
steps:
|
|
128
139
|
- uses: actions/checkout@v4
|
|
129
140
|
|
|
130
|
-
- uses: actions/setup-python@
|
|
141
|
+
- uses: actions/setup-python@v5
|
|
131
142
|
with:
|
|
132
143
|
python-version: 3.8.13
|
|
133
144
|
|
|
@@ -3,13 +3,8 @@ ci:
|
|
|
3
3
|
autofix_commit_msg: "style: pre-commit fixes"
|
|
4
4
|
|
|
5
5
|
repos:
|
|
6
|
-
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
7
|
-
rev: 23.7.0
|
|
8
|
-
hooks:
|
|
9
|
-
- id: black-jupyter
|
|
10
|
-
|
|
11
6
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
12
|
-
rev: v4.
|
|
7
|
+
rev: v4.5.0
|
|
13
8
|
hooks:
|
|
14
9
|
- id: check-added-large-files
|
|
15
10
|
- id: check-case-conflict
|
|
@@ -24,18 +19,19 @@ repos:
|
|
|
24
19
|
- id: trailing-whitespace
|
|
25
20
|
|
|
26
21
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
27
|
-
rev: "v0.
|
|
22
|
+
rev: "v0.1.14"
|
|
28
23
|
hooks:
|
|
29
24
|
- id: ruff
|
|
30
25
|
args: ["--fix", "--show-fixes"]
|
|
26
|
+
- id: ruff-format
|
|
31
27
|
|
|
32
28
|
- repo: https://github.com/tox-dev/pyproject-fmt
|
|
33
|
-
rev: "1.
|
|
29
|
+
rev: "1.7.0"
|
|
34
30
|
hooks:
|
|
35
31
|
- id: pyproject-fmt
|
|
36
32
|
|
|
37
33
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
38
|
-
rev: v1.
|
|
34
|
+
rev: v1.8.0
|
|
39
35
|
hooks:
|
|
40
36
|
- id: mypy
|
|
41
37
|
files: src
|
|
@@ -45,12 +41,12 @@ repos:
|
|
|
45
41
|
- packaging
|
|
46
42
|
|
|
47
43
|
- repo: https://github.com/codespell-project/codespell
|
|
48
|
-
rev: v2.2.
|
|
44
|
+
rev: v2.2.6
|
|
49
45
|
hooks:
|
|
50
46
|
- id: codespell
|
|
51
47
|
|
|
52
48
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
53
|
-
rev: "
|
|
49
|
+
rev: "v4.0.0-alpha.8"
|
|
54
50
|
hooks:
|
|
55
51
|
- id: prettier
|
|
56
52
|
types_or: [yaml, markdown, html, css, scss, javascript, json]
|
|
@@ -73,7 +69,7 @@ repos:
|
|
|
73
69
|
- id: rst-inline-touching-normal
|
|
74
70
|
|
|
75
71
|
- repo: https://github.com/nbQA-dev/nbQA
|
|
76
|
-
rev: 1.7.
|
|
72
|
+
rev: 1.7.1
|
|
77
73
|
hooks:
|
|
78
74
|
- id: nbqa-pyupgrade
|
|
79
75
|
args: ["--py37-plus"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vector
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Vector classes and utilities
|
|
5
5
|
Project-URL: Bug Tracker, https://github.com/scikit-hep/vector/issues
|
|
6
6
|
Project-URL: Changelog, https://vector.readthedocs.io/en/latest/changelog.html
|
|
@@ -22,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.9
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.10
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
26
|
Classifier: Topic :: Scientific/Engineering
|
|
26
27
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
27
28
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
@@ -34,11 +35,12 @@ Provides-Extra: awkward
|
|
|
34
35
|
Requires-Dist: awkward>=1.2; extra == 'awkward'
|
|
35
36
|
Provides-Extra: dev
|
|
36
37
|
Requires-Dist: awkward>=1.2; extra == 'dev'
|
|
37
|
-
Requires-Dist:
|
|
38
|
+
Requires-Dist: nox; extra == 'dev'
|
|
39
|
+
Requires-Dist: numba>=0.57; (python_version < '3.12') and extra == 'dev'
|
|
38
40
|
Requires-Dist: papermill>=2.4; extra == 'dev'
|
|
39
41
|
Requires-Dist: pytest-cov>=3; extra == 'dev'
|
|
42
|
+
Requires-Dist: pytest-doctestplus; extra == 'dev'
|
|
40
43
|
Requires-Dist: pytest>=6; extra == 'dev'
|
|
41
|
-
Requires-Dist: xdoctest>=1; extra == 'dev'
|
|
42
44
|
Provides-Extra: docs
|
|
43
45
|
Requires-Dist: awkward>=1.2; extra == 'docs'
|
|
44
46
|
Requires-Dist: ipykernel; extra == 'docs'
|
|
@@ -49,10 +51,11 @@ Requires-Dist: sphinx-copybutton; extra == 'docs'
|
|
|
49
51
|
Requires-Dist: sphinx-math-dollar; extra == 'docs'
|
|
50
52
|
Requires-Dist: sphinx>=4; extra == 'docs'
|
|
51
53
|
Provides-Extra: test
|
|
54
|
+
Requires-Dist: nox; extra == 'test'
|
|
52
55
|
Requires-Dist: papermill>=2.4; extra == 'test'
|
|
53
56
|
Requires-Dist: pytest-cov>=3; extra == 'test'
|
|
57
|
+
Requires-Dist: pytest-doctestplus; extra == 'test'
|
|
54
58
|
Requires-Dist: pytest>=6; extra == 'test'
|
|
55
|
-
Requires-Dist: xdoctest>=1; extra == 'test'
|
|
56
59
|
Provides-Extra: test-extras
|
|
57
60
|
Requires-Dist: spark-parser; extra == 'test-extras'
|
|
58
61
|
Requires-Dist: uncompyle6; extra == 'test-extras'
|
|
@@ -114,9 +117,23 @@ The easiest way to create one or many vectors is with a helper function:
|
|
|
114
117
|
- `vector.obj` to make a pure Python vector object,
|
|
115
118
|
- `vector.arr` to make a NumPy array of vectors (or `array`, lowercase, like `np.array`),
|
|
116
119
|
- `vector.awk` to make an Awkward Array of vectors (or `Array`, uppercase, like `ak.Array`).
|
|
120
|
+
- `vector.zip` to make an Awkward Array of vectors (similar to `ak.zip`)
|
|
117
121
|
|
|
118
122
|
### Pure Python vectors
|
|
119
123
|
|
|
124
|
+
You can directly use the `VectorObject` classes to construct object type vectors:
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
vector.VectorObject2D(x=1.1, y=2.2)
|
|
128
|
+
vector.MomentumObject3D(px=1.1, py=2.2, pz=3.3)
|
|
129
|
+
vector.VectorObject4D(x=1.1, y=2.2, eta=3.3, tau=4.4)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
and so on for every class.
|
|
133
|
+
|
|
134
|
+
Or, you can use a single wrapper function to construct all possible combinations of
|
|
135
|
+
object type vectors:
|
|
136
|
+
|
|
120
137
|
```python
|
|
121
138
|
# Cartesian 2D vector
|
|
122
139
|
vector.obj(x=3, y=4)
|
|
@@ -207,6 +224,34 @@ and so on, for all combinations of azimuthal, longitudinal, and temporal coordin
|
|
|
207
224
|
|
|
208
225
|
### NumPy arrays of vectors
|
|
209
226
|
|
|
227
|
+
You can directly use the `VectorNumpy` classes to construct object type vectors:
|
|
228
|
+
|
|
229
|
+
```python
|
|
230
|
+
# NumPy-like arguments (literally passed through to NumPy)
|
|
231
|
+
vector.VectorNumpy2D(
|
|
232
|
+
[(1.1, 2.1), (1.2, 2.2), (1.3, 2.3), (1.4, 2.4), (1.5, 2.5)],
|
|
233
|
+
dtype=[("x", float), ("y", float)],
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
# Pandas-like arguments (dict from names to column arrays)
|
|
237
|
+
vector.VectorNumpy2D({"x": [1.1, 1.2, 1.3, 1.4, 1.5], "y": [2.1, 2.2, 2.3, 2.4, 2.5]})
|
|
238
|
+
|
|
239
|
+
# As with objects, the coordinate system and dimension is taken from the names of the fields.
|
|
240
|
+
vector.VectorNumpy4D(
|
|
241
|
+
{
|
|
242
|
+
"x": [1.1, 1.2, 1.3, 1.4, 1.5],
|
|
243
|
+
"y": [2.1, 2.2, 2.3, 2.4, 2.5],
|
|
244
|
+
"z": [3.1, 3.2, 3.3, 3.4, 3.5],
|
|
245
|
+
"t": [4.1, 4.2, 4.3, 4.4, 4.5],
|
|
246
|
+
}
|
|
247
|
+
)
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
and so on for every class.
|
|
251
|
+
|
|
252
|
+
Or, you can use a single wrapper function to construct all possible combinations of
|
|
253
|
+
NumPy type vectors:
|
|
254
|
+
|
|
210
255
|
```python
|
|
211
256
|
# NumPy-like arguments (literally passed through to NumPy)
|
|
212
257
|
vector.array(
|
|
@@ -311,6 +356,8 @@ ak.Array(
|
|
|
311
356
|
|
|
312
357
|
All of the keyword arguments and rules that apply to `vector.obj` construction apply to `vector.awk` field names.
|
|
313
358
|
|
|
359
|
+
Finally, the `VectorAwkward` mixins can be subclassed to create custom vector classes. The awkward behavior classes and projections must be named as `*Array`. For example, `coffea` uses the following names - `TwoVectorArray`, `ThreeVectorArray`, `PolarTwoVectorArray`, `SphericalThreeVectorArray`, ...
|
|
360
|
+
|
|
314
361
|
## Vector properties
|
|
315
362
|
|
|
316
363
|
Any geometrical coordinate can be computed from vectors in any coordinate system; they'll be provided or computed as needed.
|
|
@@ -635,7 +682,12 @@ The (current) list of properties and methods is:
|
|
|
635
682
|
- `scale(factor)`: can also use the `*` operator
|
|
636
683
|
- `equal(vector)`: can also use the `==` operator, but consider `isclose` instead
|
|
637
684
|
- `not_equal(vector)`: can also use the `!=` operator, but consider `isclose` instead
|
|
685
|
+
- `sum()`: can also use the `numpy.sum` or `awkward.sum`, only for NumPy and Awkward vectors
|
|
686
|
+
- `count_nonzero()`: can also use `numpy.count_nonzero` or `awkward.count_nonzero`, only for NumPy and Awkward vectors
|
|
687
|
+
- `count()`: can also use `awkward.count`, only for Awkward vectors
|
|
638
688
|
- `isclose(vector, rtol=1e-5, atol=1e-8, equal_nan=False)`: works like [np.isclose](https://numpy.org/doc/stable/reference/generated/numpy.isclose.html); arrays also have an [allclose](https://numpy.org/doc/stable/reference/generated/numpy.allclose.html) method
|
|
689
|
+
- `to_Vector*D(coordinates)`: replace `*` with the reuquired vector dimension
|
|
690
|
+
- `to_{coordinate-names}`: for example - `to_rhophietatau`
|
|
639
691
|
|
|
640
692
|
## Compiling your Python with Numba
|
|
641
693
|
|
|
@@ -690,14 +742,15 @@ compute_masses(array)
|
|
|
690
742
|
|
|
691
743
|
## Talks about vector
|
|
692
744
|
|
|
745
|
+
- 9th October 2023 - [What’s new with Vector? First major release is out!](https://indi.to/35ym5) - [PyHEP 2023 (virtual)](https://indico.cern.ch/event/1252095/) [🎥](https://www.youtube.com/watch?v=JHEAb2R3xzE&list=PLKZ9c4ONm-VlAorAG8kR09ZqhMfHiH2LJ&index=10)
|
|
693
746
|
- 13th September 2022 - [Constructing HEP vectors and analyzing HEP data using Vector](https://indi.to/bPmMc) - [PyHEP 2022 (virtual)](https://indico.cern.ch/event/1150631/) [🎥](https://www.youtube.com/watch?v=4iveMzrbe7s&list=PLKZ9c4ONm-VkohKG-skzEG_gklMaSgaO7&index=15)
|
|
694
747
|
- 20th July 2022 - [Analysis Grand Challenge / HEP Scientific Python Ecosystem](https://indico.cern.ch/event/1151329/timetable/#3-analysis-grand-challenge-hep) - [DANCE/CoDaS@Snowmass 2022 computational and data science software training](https://indico.cern.ch/event/1151329/)
|
|
695
748
|
- 25th April 2022 - [Foundation libraries (uproot, awkward, hist, mplhep)](https://indico.cern.ch/event/1126109/contributions/4780138/) - [IRIS-HEP AGC Tools 2022 Workshop](https://indico.cern.ch/event/1126109/) [🎥](https://www.youtube.com/watch?v=O9KvsDMKOmY)
|
|
696
749
|
- 3rd November 2021 - [Data handling: uproot, awkward & vector](https://indico.cern.ch/event/1076231/contributions/4560398/) - [IRIS-HEP AGC Tools 2021 Workshop](https://indico.cern.ch/event/1076231/) [🎥](https://indico.cern.ch/event/1076231/contributions/4560398/attachments/2338579/4017718/agc_uproot_awk.mp4)
|
|
697
750
|
|
|
698
|
-
### Status as of
|
|
751
|
+
### Status as of November 17, 2023
|
|
699
752
|
|
|
700
|
-
|
|
753
|
+
First major release of vector is out and the package has reached a stable position. The work is spearheaded by bug reports and feature requests created on GitHub. It can only be improved by your feedback!
|
|
701
754
|
|
|
702
755
|
## Contributors ✨
|
|
703
756
|
|
|
@@ -738,7 +791,7 @@ This library was primarily developed by Jim Pivarski, Henry Schreiner, and Eduar
|
|
|
738
791
|
|
|
739
792
|
Support for this work was provided by the National Science Foundation cooperative agreement OAC-1836650 (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.
|
|
740
793
|
|
|
741
|
-
[actions-badge]: https://github.com/scikit-hep/vector/workflows/
|
|
794
|
+
[actions-badge]: https://github.com/scikit-hep/vector/actions/workflows/ci.yml/badge.svg
|
|
742
795
|
[actions-link]: https://github.com/scikit-hep/vector/actions
|
|
743
796
|
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
|
|
744
797
|
[black-link]: https://github.com/psf/black
|
|
@@ -54,9 +54,23 @@ The easiest way to create one or many vectors is with a helper function:
|
|
|
54
54
|
- `vector.obj` to make a pure Python vector object,
|
|
55
55
|
- `vector.arr` to make a NumPy array of vectors (or `array`, lowercase, like `np.array`),
|
|
56
56
|
- `vector.awk` to make an Awkward Array of vectors (or `Array`, uppercase, like `ak.Array`).
|
|
57
|
+
- `vector.zip` to make an Awkward Array of vectors (similar to `ak.zip`)
|
|
57
58
|
|
|
58
59
|
### Pure Python vectors
|
|
59
60
|
|
|
61
|
+
You can directly use the `VectorObject` classes to construct object type vectors:
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
vector.VectorObject2D(x=1.1, y=2.2)
|
|
65
|
+
vector.MomentumObject3D(px=1.1, py=2.2, pz=3.3)
|
|
66
|
+
vector.VectorObject4D(x=1.1, y=2.2, eta=3.3, tau=4.4)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
and so on for every class.
|
|
70
|
+
|
|
71
|
+
Or, you can use a single wrapper function to construct all possible combinations of
|
|
72
|
+
object type vectors:
|
|
73
|
+
|
|
60
74
|
```python
|
|
61
75
|
# Cartesian 2D vector
|
|
62
76
|
vector.obj(x=3, y=4)
|
|
@@ -147,6 +161,34 @@ and so on, for all combinations of azimuthal, longitudinal, and temporal coordin
|
|
|
147
161
|
|
|
148
162
|
### NumPy arrays of vectors
|
|
149
163
|
|
|
164
|
+
You can directly use the `VectorNumpy` classes to construct object type vectors:
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
# NumPy-like arguments (literally passed through to NumPy)
|
|
168
|
+
vector.VectorNumpy2D(
|
|
169
|
+
[(1.1, 2.1), (1.2, 2.2), (1.3, 2.3), (1.4, 2.4), (1.5, 2.5)],
|
|
170
|
+
dtype=[("x", float), ("y", float)],
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
# Pandas-like arguments (dict from names to column arrays)
|
|
174
|
+
vector.VectorNumpy2D({"x": [1.1, 1.2, 1.3, 1.4, 1.5], "y": [2.1, 2.2, 2.3, 2.4, 2.5]})
|
|
175
|
+
|
|
176
|
+
# As with objects, the coordinate system and dimension is taken from the names of the fields.
|
|
177
|
+
vector.VectorNumpy4D(
|
|
178
|
+
{
|
|
179
|
+
"x": [1.1, 1.2, 1.3, 1.4, 1.5],
|
|
180
|
+
"y": [2.1, 2.2, 2.3, 2.4, 2.5],
|
|
181
|
+
"z": [3.1, 3.2, 3.3, 3.4, 3.5],
|
|
182
|
+
"t": [4.1, 4.2, 4.3, 4.4, 4.5],
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
and so on for every class.
|
|
188
|
+
|
|
189
|
+
Or, you can use a single wrapper function to construct all possible combinations of
|
|
190
|
+
NumPy type vectors:
|
|
191
|
+
|
|
150
192
|
```python
|
|
151
193
|
# NumPy-like arguments (literally passed through to NumPy)
|
|
152
194
|
vector.array(
|
|
@@ -251,6 +293,8 @@ ak.Array(
|
|
|
251
293
|
|
|
252
294
|
All of the keyword arguments and rules that apply to `vector.obj` construction apply to `vector.awk` field names.
|
|
253
295
|
|
|
296
|
+
Finally, the `VectorAwkward` mixins can be subclassed to create custom vector classes. The awkward behavior classes and projections must be named as `*Array`. For example, `coffea` uses the following names - `TwoVectorArray`, `ThreeVectorArray`, `PolarTwoVectorArray`, `SphericalThreeVectorArray`, ...
|
|
297
|
+
|
|
254
298
|
## Vector properties
|
|
255
299
|
|
|
256
300
|
Any geometrical coordinate can be computed from vectors in any coordinate system; they'll be provided or computed as needed.
|
|
@@ -575,7 +619,12 @@ The (current) list of properties and methods is:
|
|
|
575
619
|
- `scale(factor)`: can also use the `*` operator
|
|
576
620
|
- `equal(vector)`: can also use the `==` operator, but consider `isclose` instead
|
|
577
621
|
- `not_equal(vector)`: can also use the `!=` operator, but consider `isclose` instead
|
|
622
|
+
- `sum()`: can also use the `numpy.sum` or `awkward.sum`, only for NumPy and Awkward vectors
|
|
623
|
+
- `count_nonzero()`: can also use `numpy.count_nonzero` or `awkward.count_nonzero`, only for NumPy and Awkward vectors
|
|
624
|
+
- `count()`: can also use `awkward.count`, only for Awkward vectors
|
|
578
625
|
- `isclose(vector, rtol=1e-5, atol=1e-8, equal_nan=False)`: works like [np.isclose](https://numpy.org/doc/stable/reference/generated/numpy.isclose.html); arrays also have an [allclose](https://numpy.org/doc/stable/reference/generated/numpy.allclose.html) method
|
|
626
|
+
- `to_Vector*D(coordinates)`: replace `*` with the reuquired vector dimension
|
|
627
|
+
- `to_{coordinate-names}`: for example - `to_rhophietatau`
|
|
579
628
|
|
|
580
629
|
## Compiling your Python with Numba
|
|
581
630
|
|
|
@@ -630,14 +679,15 @@ compute_masses(array)
|
|
|
630
679
|
|
|
631
680
|
## Talks about vector
|
|
632
681
|
|
|
682
|
+
- 9th October 2023 - [What’s new with Vector? First major release is out!](https://indi.to/35ym5) - [PyHEP 2023 (virtual)](https://indico.cern.ch/event/1252095/) [🎥](https://www.youtube.com/watch?v=JHEAb2R3xzE&list=PLKZ9c4ONm-VlAorAG8kR09ZqhMfHiH2LJ&index=10)
|
|
633
683
|
- 13th September 2022 - [Constructing HEP vectors and analyzing HEP data using Vector](https://indi.to/bPmMc) - [PyHEP 2022 (virtual)](https://indico.cern.ch/event/1150631/) [🎥](https://www.youtube.com/watch?v=4iveMzrbe7s&list=PLKZ9c4ONm-VkohKG-skzEG_gklMaSgaO7&index=15)
|
|
634
684
|
- 20th July 2022 - [Analysis Grand Challenge / HEP Scientific Python Ecosystem](https://indico.cern.ch/event/1151329/timetable/#3-analysis-grand-challenge-hep) - [DANCE/CoDaS@Snowmass 2022 computational and data science software training](https://indico.cern.ch/event/1151329/)
|
|
635
685
|
- 25th April 2022 - [Foundation libraries (uproot, awkward, hist, mplhep)](https://indico.cern.ch/event/1126109/contributions/4780138/) - [IRIS-HEP AGC Tools 2022 Workshop](https://indico.cern.ch/event/1126109/) [🎥](https://www.youtube.com/watch?v=O9KvsDMKOmY)
|
|
636
686
|
- 3rd November 2021 - [Data handling: uproot, awkward & vector](https://indico.cern.ch/event/1076231/contributions/4560398/) - [IRIS-HEP AGC Tools 2021 Workshop](https://indico.cern.ch/event/1076231/) [🎥](https://indico.cern.ch/event/1076231/contributions/4560398/attachments/2338579/4017718/agc_uproot_awk.mp4)
|
|
637
687
|
|
|
638
|
-
### Status as of
|
|
688
|
+
### Status as of November 17, 2023
|
|
639
689
|
|
|
640
|
-
|
|
690
|
+
First major release of vector is out and the package has reached a stable position. The work is spearheaded by bug reports and feature requests created on GitHub. It can only be improved by your feedback!
|
|
641
691
|
|
|
642
692
|
## Contributors ✨
|
|
643
693
|
|
|
@@ -678,7 +728,7 @@ This library was primarily developed by Jim Pivarski, Henry Schreiner, and Eduar
|
|
|
678
728
|
|
|
679
729
|
Support for this work was provided by the National Science Foundation cooperative agreement OAC-1836650 (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.
|
|
680
730
|
|
|
681
|
-
[actions-badge]: https://github.com/scikit-hep/vector/workflows/
|
|
731
|
+
[actions-badge]: https://github.com/scikit-hep/vector/actions/workflows/ci.yml/badge.svg
|
|
682
732
|
[actions-link]: https://github.com/scikit-hep/vector/actions
|
|
683
733
|
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
|
|
684
734
|
[black-link]: https://github.com/psf/black
|
|
@@ -1,7 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Version 1.2
|
|
4
|
+
|
|
5
|
+
### Version 1.2.0
|
|
6
|
+
|
|
7
|
+
#### Bug fixes
|
|
8
|
+
|
|
9
|
+
- fix: result of an infix operation should be demoted to the lowest possible dimension [#413][]
|
|
10
|
+
- fix: all infix operations should not depend on the order of arguments [#413][]
|
|
11
|
+
- fix: return the correct awkward record when performing an infix operation [#413][]
|
|
12
|
+
- fix: respect user defined awkward mixin subclasses and projection classes [#413][]
|
|
13
|
+
|
|
14
|
+
#### Documentation
|
|
15
|
+
|
|
16
|
+
- Update `README` and `intro.ipynb` to include the latest developments [#399][]
|
|
17
|
+
- docs: add docs for vector.zip [#390][]
|
|
18
|
+
- Fix Vector\* mixin's docstring [#404][]
|
|
19
|
+
|
|
20
|
+
#### Maintenance
|
|
21
|
+
|
|
22
|
+
- chore: repo review updates [#408][]
|
|
23
|
+
- black -> ruff format [#414][]
|
|
24
|
+
- chore: migrate to pytest-doctestplus [#416][]
|
|
25
|
+
|
|
26
|
+
[#390]: https://github.com/scikit-hep/vector/pull/390
|
|
27
|
+
[#404]: https://github.com/scikit-hep/vector/pull/404
|
|
28
|
+
[#399]: https://github.com/scikit-hep/vector/pull/399
|
|
29
|
+
[#408]: https://github.com/scikit-hep/vector/pull/408
|
|
30
|
+
[#414]: https://github.com/scikit-hep/vector/pull/414
|
|
31
|
+
[#416]: https://github.com/scikit-hep/vector/pull/416
|
|
32
|
+
[#413]: https://github.com/scikit-hep/vector/pull/413
|
|
33
|
+
|
|
3
34
|
## Version 1.1
|
|
4
35
|
|
|
36
|
+
### Version 1.1.1.post1
|
|
37
|
+
|
|
38
|
+
#### Maintenance
|
|
39
|
+
|
|
40
|
+
- chore: support Python 3.12 [#388][]
|
|
41
|
+
- Fix CI badge in README and docs [#386][]
|
|
42
|
+
|
|
43
|
+
[#388]: https://github.com/scikit-hep/vector/pull/388
|
|
44
|
+
[#386]: https://github.com/scikit-hep/vector/pull/386
|
|
45
|
+
|
|
5
46
|
### Version 1.1.1
|
|
6
47
|
|
|
7
48
|
#### Bug fixes
|
|
@@ -114,7 +155,7 @@
|
|
|
114
155
|
- chore: minor cleanups [#266][]
|
|
115
156
|
- chore: test on `awkward v1.10.0` and add cov to `noxfile` [#256][]
|
|
116
157
|
- chore: use Python 3.11! [#282][]
|
|
117
|
-
- chore: zenodo
|
|
158
|
+
- chore: zenodo badge sync [#269][]
|
|
118
159
|
- ci: test notebooks on PRs [#272][]
|
|
119
160
|
|
|
120
161
|
[#256]: https://github.com/scikit-hep/vector/pull/256
|
|
@@ -111,7 +111,7 @@ The API reference details the functionality of each ``class`` and ``function`` p
|
|
|
111
111
|
|
|
112
112
|
api/modules.rst
|
|
113
113
|
|
|
114
|
-
.. |Action status| image:: https://github.com/scikit-hep/vector/workflows/
|
|
114
|
+
.. |Action status| image:: https://github.com/scikit-hep/vector/actions/workflows/ci.yml/badge.svg
|
|
115
115
|
:target: https://github.com/scikit-hep/vector/actions
|
|
116
116
|
.. |Documentation Status| image:: https://readthedocs.org/projects/vector/badge/?version=latest
|
|
117
117
|
:target: https://vector.readthedocs.io/en/latest/?badge=latest
|