[Scipy-svn] r4102 - trunk/scipy/io/arff

scipy-svn at scipy.org scipy-svn at scipy.org
Mon Apr 7 18:53:19 EDT 2008


Author: cdavid
Date: 2008-04-07 17:53:14 -0500 (Mon, 07 Apr 2008)
New Revision: 4102

Modified:
   trunk/scipy/io/arff/__init__.py
   trunk/scipy/io/arff/arffread.py
Log:
Add a basic doc for arff reader.

Modified: trunk/scipy/io/arff/__init__.py
===================================================================
--- trunk/scipy/io/arff/__init__.py	2008-04-07 22:08:16 UTC (rev 4101)
+++ trunk/scipy/io/arff/__init__.py	2008-04-07 22:53:14 UTC (rev 4102)
@@ -0,0 +1,12 @@
+"""Module to read arff files (weka format).
+
+arff is a simple file format which support numerical, string and data values.
+It supports sparse data too.
+
+See http://weka.sourceforge.net/wekadoc/index.php/en:ARFF_(3.4.6) for more
+details about arff format and available datasets."""
+
+from arffread import *
+import arffread
+
+__all__ = arffread.__all__

Modified: trunk/scipy/io/arff/arffread.py
===================================================================
--- trunk/scipy/io/arff/arffread.py	2008-04-07 22:08:16 UTC (rev 4101)
+++ trunk/scipy/io/arff/arffread.py	2008-04-07 22:53:14 UTC (rev 4102)
@@ -10,6 +10,8 @@
 
 """A module to read arff files."""
 
+__all__ = ['MetaData', 'read_arff', 'ArffError', 'ParseArffError']
+
 # An Arff file is basically two parts: 
 #   - header
 #   - data
@@ -332,6 +334,18 @@
         return self._attributes[key]
 
 def read_arff(filename):
+    """Read an arff file.
+
+    :Note:
+
+        This function should be able to read most arff files. Not implemented
+        functionalities include:
+            - date type attributes
+            - string type attributes
+
+        It can read files with numeric and nominal attributes.
+        It can read files with sparse data (? in the file).
+    """
     ofile = open(filename)
 
     # Parse the header file 




More information about the Scipy-svn mailing list