A Python package for handling data arrays with axis labels
Project description
Labelled-Data-Array
Is a package for handling N-dimensional numerical data arrays with labels. This is simply a wrapper numpy wrapper with labels management and some data selection and casting support.
It is important to note that all the labels for a single axis need to be unique!
Example
Given N ground motion recording stations, M different intensity measures, K different realisations, a LabelledDataArray allows for easily handling of this data while also keeping track of associated lables.
import numpy as np
import labelled_data_array as lda
stations = ["ACB", "DSF", "GHI", "JKL"]
ims = ["PGA", "PGV"]
rels = ["REL01", "REL02", "REL03", "REL04"]
# Generate some random data
data = np.random.rand(len(stations), len(ims), len(rels))
# Creation of a LabelledDataArray
im_data = lda.LabelledDataArray(data, axis_labels=[stations, ims, rels])
# Numpy indexing is supported
print(im_data[0, :, :])
### Data selection by axis value(s) ###
# E.g. select all IM values for station "ACB"
# 2D output is returned as a DataFrame
print(im_data.sel["ACB", :, :])
# Select all values for station "ACB" and IM "PGA"
# 1D output is returned as a Series
print(im_data.sel["ACB", "PGA", :])
# Get the scalar value for station "ACB", IM "PGA" and REL "REL01"
print(im_data.sel["ACB", "PGA", "REL01"])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file labelled_data_array-2025.12.2.tar.gz.
File metadata
- Download URL: labelled_data_array-2025.12.2.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f029d5b5b2d5abf220432916afa1c003e16adca1774cfc4b3cf69bf475fa13ee
|
|
| MD5 |
03d0746d967b1de3f7bc48255b6f548e
|
|
| BLAKE2b-256 |
975180ce796a926a8fb058573b63e8872e31b041272af0cdfb5a056e24db453e
|
Provenance
The following attestation bundles were made for labelled_data_array-2025.12.2.tar.gz:
Publisher:
publish-PyPI.yml on claudio525/labelled-data-array
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labelled_data_array-2025.12.2.tar.gz -
Subject digest:
f029d5b5b2d5abf220432916afa1c003e16adca1774cfc4b3cf69bf475fa13ee - Sigstore transparency entry: 737477668
- Sigstore integration time:
-
Permalink:
claudio525/labelled-data-array@b0031606b1bcbde80a8d54921bb1209591717c81 -
Branch / Tag:
refs/tags/v2025.12.2 - Owner: https://github.com/claudio525
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-PyPI.yml@b0031606b1bcbde80a8d54921bb1209591717c81 -
Trigger Event:
release
-
Statement type:
File details
Details for the file labelled_data_array-2025.12.2-py3-none-any.whl.
File metadata
- Download URL: labelled_data_array-2025.12.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2a9ae36cced696f358153a19eb42cf27ba8be2f9e5d8fce724d5515dce1349c
|
|
| MD5 |
752db6745519591671ee413b72169d27
|
|
| BLAKE2b-256 |
b5c4d38f294a3fa1901ef1c4344fbae2f2cd0f5984de1880faa11960a8e63e17
|
Provenance
The following attestation bundles were made for labelled_data_array-2025.12.2-py3-none-any.whl:
Publisher:
publish-PyPI.yml on claudio525/labelled-data-array
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
labelled_data_array-2025.12.2-py3-none-any.whl -
Subject digest:
e2a9ae36cced696f358153a19eb42cf27ba8be2f9e5d8fce724d5515dce1349c - Sigstore transparency entry: 737477671
- Sigstore integration time:
-
Permalink:
claudio525/labelled-data-array@b0031606b1bcbde80a8d54921bb1209591717c81 -
Branch / Tag:
refs/tags/v2025.12.2 - Owner: https://github.com/claudio525
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-PyPI.yml@b0031606b1bcbde80a8d54921bb1209591717c81 -
Trigger Event:
release
-
Statement type: