#!/usr/bin/env python
# coding=utf-8
"""
A plain parser class

"""
__author__  = 'Alisue (lambdalisue@hashnote.net)'

import numpy as np
from maidenhair.parsers.base import BaseParser

class PlainParser(BaseParser):
    """
    A plain text parser class based on `numpy.loadtxt` method
    """
    def parse(self, iterable, **kwargs):
        """
        Parse whitespace separated iterable to a numpy array.
        It is based on `numpy.loadtxt` method.

        Parameters
        ----------
            iterable : iterable
                An iterable instance to parse

        Returns
        -------
        ndarray
            An instance of numpy array

        """
        return np.loadtxt(iterable, **kwargs)

@@ -178,16 +178,17 @@
 Parser%0A%0A
+%0A
 class Pl
@@ -714,8 +714,556 @@
 kwargs)%0A
+%0A%0Aclass CSVParser(BaseParser):%0A    %22%22%22%0A    A CSV text parser class based on %60numpy.loadtxt%60 method%0A    %22%22%22%0A    def parse(self, iterable, **kwargs):%0A        %22%22%22%0A        Parse whitespace separated iterable to a numpy array.%0A        It is based on %60numpy.loadtxt%60 method.%0A%0A        Parameters%0A        ----------%0A            iterable : iterable%0A                An iterable instance to parse%0A%0A        Returns%0A        -------%0A        ndarray%0A            An instance of numpy array%0A%0A        %22%22%22%0A        return np.loadtxt(iterable, delimiter=',', **kwargs)%0A

Add CSVParser