Giter Site home page Giter Site logo

bugraoral / idx2numpy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ivanyu/idx2numpy

0.0 2.0 0.0 311 KB

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

License: MIT License

Makefile 1.62% Python 98.38%

idx2numpy's Introduction

idx2numpy

idx2numpy package provides a tool for converting files to and 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.

Build Status

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

Usage

import idx2numpy

# Reading
ndarr = idx2numpy.convert_from_file('myfile.idx')

f_read = open('myfile.idx', 'rb')
ndarr = idx2numpy.convert_from_file(f_read)

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

# Writing    
idx2numpy.convert_to_file('myfile_copy.idx', ndarr)

f_write = open('myfile_copy2.idx', 'w')
idx2numpy.convert_to_file(f_write, ndarr)

s = convert_to_string(ndarr)

Authors and Contributors

The project is started and maintained by Ivan Yurchenko ([email protected]). The Contributors are:

License

MIT license (see LICENSE file)

Also

Please, send me a feedback about the library, such as bugs, use cases etc.

idx2numpy's People

Contributors

asnr avatar ivanyu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.