ponte
A mini-library to process arrays to .json files and viceversa. Developed to pass arrays between Python and C++ through the use of json DOK files.
Installation
pip install ponte
Contributors
- Andrew Garcia - creator and maintainer
Contributing
- Fork it (https://github.com/your-github-user/tensorscout/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Usage Example
For full application, i.e. passing array structures between Python and C++ code, see bridge
import ponte as bridge
import numpy as np
'CREATE A 1-D VECTOR'
X = np.random.choice([0,1,2,3],10,p=[0.7,0.1,0.1,0.1])
'pack vector to .json file'
bridge.tojson('sample.json',X)
'PROCESS JSON FILE BACK TO VECTOR'
array_form = bridge.jsonload('sample.json')
'print vector'
print('array:\n',array_form)
'''
array to DOK:
{
"map": [
[1],
[4],
[5],
[8],
[9]
],
"value": [2, 3, 2, 2, 2],
"odims": [10]
}
DOK to array:
[0. 2. 0. 0. 3. 2. 0. 0. 2. 2.]
'''
Metadata
Release files for ponte 0.0.1
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 |
|---|---|---|---|---|
| ponte-0.0.1.tar.gz | 2.8 kB | Without provenance | Details for ponte-0.0.1.tar.gz |
Release files / ponte-0.0.1.tar.gz
| Download URL | ponte-0.0.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9e0faa0f93f4c84a0d55c15357237a0a42fff7f5a910b01c6f1bbffdc7e51af
|
|
BLAKE2b-256 checksum How to use checksums |
dde16064bec2fdeb7123a1a8a8f95483e61b510aabf24009c280c4e36700ea29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.3
|
Security for ponte 0.0.1
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.