Vectorized2D
This is a user-friendly wrapper to numpy arrays, for dealing with numerical problems in a vectorized fashion - in the 2D world.
Provided objects include:
Array2D- a user-friendly interface to numpy arrays of shape=Nx2.Vector2D- a user-friendly wrapper for arrays of 2D vectors that represent physical quantities.Point2D- a user-friendly wrapper to arrays of 2D points that represent spatial locations in a cartesian coordinate system.Coordinate- a user-friendly wrapper for arrays of 2D points that represent 2D spatial (geographical) coordinates (longitude and latitude) in radians.
Installation
The easiest way to install vectorized2d and get updates is via the Python Package Index (PyPI):
$ pip install vectorized2d
Performance
Vectorized2d uses Numba to gain enhanced performance compared to vanilla numpy.
For example, (per-row) norm calculation:
>>> import numpy as np
>>> from vectorized2d import Array2D
>>> a_np = np.random.random(size=(1000, 2))
>>> a_2d = a_np.view(Array2D)
>>> %timeit np.linalg.norm(a_np, axis=1)
23.1 µs ± 1.25 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
>>> %timeit np.sqrt(np.einsum('ij,ij->i', a_np, a_np))
10.5 µs ± 40.2 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
>>> %timeit a_2d.norm
2.63 µs ± 67.9 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
Metadata
Release files for vectorized2d 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vectorized2d-0.0.7.tar.gz | 8.8 kB | Without provenance | Details for vectorized2d-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vectorized2d-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for vectorized2d-0.0.7-py3-none-any.whl |
Total release size: 19.5 kB
Release files / vectorized2d-0.0.7.tar.gz
| Download URL | vectorized2d-0.0.7.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f105f118f796a210422133bd061a5ab1abfb07a57ffa5416eeb9d41af4941574
|
|
BLAKE2b-256 checksum How to use checksums |
a369c2b5223e92335843cb0e089f731f22aab09838c7873ec6b042de65e96931
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
|
Release files / vectorized2d-0.0.7-py3-none-any.whl
| Download URL | vectorized2d-0.0.7-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f17b81525fbdb2137ddd38f1dcdd0de85431aef298e6d1c98b110ce26dbdf31e
|
|
BLAKE2b-256 checksum How to use checksums |
f30909c79f0cc6de6b5c5cd7f4ea854e51d16c07c56349eae88e9609ae4b3687
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
|
Security for vectorized2d 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.