Skip to main content

A Python package which provides tools to convert files from IDX format (described at http://yann.lecun.com/exdb/mnist/) into numpy.ndarray.

Project description

idx2numpy

idx2numpy package provides a tool for converting files from IDX format to numpy.ndarray. You can meet files in IDX format, e.g. when you’re going to read the [MNIST database of handwritten digits] (http://yann.lecun.com/exdb/mnist/) provided by Yann LeCun.

The description of IDX format also can be found on this page.

Installation

The easiest way to install is by using pip to pull it from PyPI:

pip install idx2numpy

You can also clone the Git repository from Github and install the package manually:

git clone https://github.com/ivanyu/idx2numpy.git python setup.py install

Note: Unfortunately, work with Python 3 hasn’t been tested yet.

Usage

import idx2numpy ndarr = idx2numpy.convert_from_file(‘myfile.idx’)

f = open(‘myfile.idx’, ‘rb) ndarr = idx2numpy.convert_from_file(f)

s = f.read() ndarr = idx2numpy.convert_from_string(s)

Project details


Release history Release notifications

History Node

1.2.2

History Node

1.2.1

History Node

1.2.0

History Node

1.1.0

History Node

1.0.1

This version
History Node

1.0

History Node

1.0b

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
idx2numpy-1.0.zip (9.2 kB) Copy SHA256 hash SHA256 Source None Aug 18, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page