Skip to main content

pure_cifar_10

A pure Python, minimal-dependency loader for the CIFAR-10 dataset. This package provides the CIFAR-10 images and labels as NumPy arrays, with automatic downloading and caching, requiring only numpy and tqdm.

Features

  • Minimal Dependencies: Only requires numpy and tqdm. No heavy machine learning frameworks like PyTorch or TensorFlow.
  • Automatic Handling: Downloads the CIFAR-10 dataset automatically on first use and caches it locally.
  • Pure NumPy: Returns standard numpy.ndarray objects for easy integration into any pipeline.
  • Progress Visualization: Uses tqdm to show download and loading progress bars.
  • Simple API: Mirrors the clean, functional style of the mnist_datasets package.

Installation

You can install the package directly from PyPI using pip:

pip install pure_cifar_10

Usage

from pure_cifar_10 import CIFAR10
loader = CIFAR10() 
train_data, train_labels, test_data, test_labels = loader.load_all()

Optionally specify a custom folder and load train and test data as required.

loader = CIFAR10(folder="/tmp/data) 
train_data, train_labels = loader.load() # train=True by default 
test_data, test_labels = loader.load(train=False)
print(train_data.shape, train_labels.shape)
print(test_data.shape, test_labels.shape)

(50000, 3, 32, 32) (50000,)
(10000, 3, 32, 32) (10000,)

classes = loader.class_names
print(classes)
('airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck')

Data Format

  • Images: The data arrays have shape (N, 3, 32, 32), where N is the number of samples. This is a channels-first format (3 color channels, Red-Green-Blue). Pixel values are float32 in the range [0, 255], as stored in the original dataset.
  • Labels: The labels are 1D numpy arrays of dtype int64, containing integers from 0 to 9.

Class Names

The dataset contains 10 mutually exclusive classes: 0. airplane

  1. automobile
  2. bird
  3. cat
  4. deer
  5. dog
  6. frog
  7. horse
  8. ship
  9. truck

Metadata

Release files for pure-cifar-10 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pure-cifar-10 0.1.1
File Size Uploaded Provenance Actions
pure_cifar_10-0.1.1.tar.gz 4.1 kB Without provenance Details for pure_cifar_10-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pure-cifar-10 0.1.1
File Interpreter ABI Platform Actions
pure_cifar_10-0.1.1-py3-none-any.whl Python 3 none any Details for pure_cifar_10-0.1.1-py3-none-any.whl

Total release size: 8.5 kB

Release files / pure_cifar_10-0.1.1.tar.gz

Download URL pure_cifar_10-0.1.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9ae29b81411478cbbfb8f9d2f932c4a9dea4190e62db049339ebeddf7d4b6855
BLAKE2b-256 checksum
How to use checksums
6c9bcbc793c2f83456586b3e52a8c6264e95080f8782c4af8a75c7d53eb93606
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / pure_cifar_10-0.1.1-py3-none-any.whl

Download URL pure_cifar_10-0.1.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4174be3c23000efb414b718a17d7d1c6cccbfa15a40ff569b57c61140c29f94d
BLAKE2b-256 checksum
How to use checksums
4bf9d8ac11ddbd5d506e7c6be71b8a33698c73fd9dc108f6c9e0595f7cd60619
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Security for pure-cifar-10 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page