An infinite-dimensional vector Python package.
>>> from vector import vecadd
>>> vecadd((1, 2), (4, 5, 6))
(5, 7, 6)
>>>
>>> from vector import Vector
>>> v = Vector((1, 2))
>>> w = Vector((4, 5, 6))
>>> v + w
Vector(5, 7, 6, ...)
>>>
>>> from vector import vecnpadd
>>> vecnpadd((1, 2), ((3, 4, 5),
... (6, 7, 8)))
array([[4, 6, 5],
[7, 9, 8]])
pip install git+https://github.com/goessl/vector.git
Read the documentation page or read the raw markdown
-
zip
version betweenzip
&zip_longest
. Yields different sized tuples. Done: goessl/zipvar - docstrings
-
numpy
routines - multiaxis vectors: tensors?
- never use
numpy.int64
, they don't detect overflows - sparse vectors (
dict
s) - C, C++ & Java version
- all modules imported in
__init__.py
? - all functions and classes exposed in
__all__
of every module? - all docstrings copied to
README.md
? README.md
anddocs
synchronised?- all tests written?
- all tests passed?
Copyright (c) 2022-2025 Sebastian Gössl
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.