structured-array
Efficient manipulation of the numpy structured arrays.
Installation
pip install structured-array
Examples
A structured array can easily be created.
import structured_array as st
arr = st.array({
"label": ["a", "b", "c"],
"value": [4, 5, 6],
"array": [np.zeros(3), np.ones(3), np.zeros(3)],
})
arr
label value array
[<U1] [<i8] [<f8]
------- ------- ----------
a 4 (3,) array
b 5 (3,) array
c 6 (3,) array
You can directly read and write the structured array from/to a npy file.
arr = st.read_npy("data.npy")
structured-array use polars expression system
to manipulate the structured array.
arr.select("label", st.col("value") + 1) # column selection
arr.group_by("label").agg(st.col("value").sum()) # aggregation
arr.filter(st.col("value") > 5) # filtering
License
structured-array is distributed under the terms of the MIT license.
Metadata
Release files for structured-array 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 | |
|---|---|---|---|---|
| structured_array-0.0.1.tar.gz | 19.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| structured_array-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.9 kB
Release files / structured_array-0.0.1.tar.gz
| Download URL | structured_array-0.0.1.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68c7833d3b533e6a2f6161de87c18feada2e771f6c0a33eaac67d13408137ea5
|
|
BLAKE2b-256 checksum How to use checksums |
413c62ea276c89201736fb2dbdd745a3a85d75833675499d9703fb4f938159dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Release files / structured_array-0.0.1-py3-none-any.whl
| Download URL | structured_array-0.0.1-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc7a75e67ac7134322b6521e994ec80489551834beee75f7f835031abf7222e3
|
|
BLAKE2b-256 checksum How to use checksums |
edc3638b39c7d986252db967ef24dd6b1db83e487ea4f0d8861ec3e092eca531
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Security for structured-array 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.