Giter Site home page Giter Site logo

npreadtext's People

Contributors

warrenweckesser avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

npreadtext's Issues

Question: handling encoding parameter

One of the outstanding tasks in #1 is handling the encoding parameter.

I've looked at this a bit and thought that doing so may require some changes in the parsing code, particularly in tokenize. Currently, tokenize uses char32_t to represent elements in the word buffer which works as expected for utf encoded files, but is a tricky fit for buffers of bytes. I was thinking that the simplest solution would be to template the tokenize function to provide version that handled buffers of bytes also.

IYO does this sound sensible? Or is there maybe a simpler way of treating buffers of bytes without having to modify the tokenization function?

Create clone of numpy.loadtxt

Create the function loadtxt with an API that is compatible with numpy.loadtxt.

API completion tasks

  • handle sequences, iterators, generators, etc.--whatever loadtxt can handle (currently read handles a filename or a file-like object)
  • converters parameter
  • encoding parameter
  • parse complex values (e.g. 1.2-3.4j). (Make the complex unit character configurable.)
  • unpack parameter
  • ndmin parameter
  • dtype parameter
  • comments parameter
    • one comment string, max 2 characters.
    • multiple comment strings (low priority)
  • delimiter parameter
  • skiprows parameter
  • usecols parameter
  • max_rows parameter

Optimization

  • Dynamically update data types in a single pass (currently, giving an explicit dtype results in a single pass, and specifying dtype=None results in two passes)

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.