Skip to main content

Advanced data type handling and dataset utilities for NumPy.

Project description

numpy-dtype-utils

Advanced data type handling and dataset utilities for NumPy.

Features

  • Efficient Data Loading: Optimized loading for structured datasets.
  • DType Inspection: utilities to analyze numpy dtypes (inspect.py).
  • Safe Type Casting: Robust type conversion and promotion helpers (cast.py).
  • Data Cleaning Pipelines: Streamlined handling of missing values, outliers, and duplicates.
  • Visualization Tools: Integrated plotting for correlation matrices and distributions.
  • Clustering Support: K-means clustering for spatial data analysis.

Installation

pip install numpy-dtype-utils

Usage

from numpy_dtype_utils import Dataset, get_dtype_info, safe_cast
import numpy as np

# --- Dataset Utility ---
# Initialize dataset loader
dataset = Dataset("/path/to/data")

# Load and clean data
dataset.load(max_days=5).clean(remove_outliers=True)

# Visualize distributions
dataset.plot_distributions()

# --- Type Inspection ---
dt_info = get_dtype_info('float32')
print(dt_info)  # {'name': 'float32', 'itemsize': 4, ...}

# --- Safe Casting ---
arr = np.array([1, 2, 3], dtype='int32')
casted = safe_cast(arr, 'float64')

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numpy_dtype_utils-0.1.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file numpy_dtype_utils-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for numpy_dtype_utils-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2175afc340683264cc92501ce0c4c64c0bf356a61967c3065fd606d748260433
MD5 9c1f3ffedb306e9022e968399681ba79
BLAKE2b-256 269fed5d4ffa61c95adca5ff81f18c36efa71a66f6fee120a6b4b0d566b8118d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page