From 7ce9418dbdfc274fc741b2f8ebdd5b901c727e40 Mon Sep 17 00:00:00 2001 From: Joel Nothman Date: Thu, 16 Aug 2018 18:39:00 +1000 Subject: [PATCH] MNT Update liac-arff to 2.3.1 --- sklearn/externals/_arff.py | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/sklearn/externals/_arff.py b/sklearn/externals/_arff.py index 6225dfc3691c3..7fb445ef9d5a5 100644 --- a/sklearn/externals/_arff.py +++ b/sklearn/externals/_arff.py @@ -146,7 +146,7 @@ __author_email__ = ('renato.ppontes@gmail.com, ' 'feurerm@informatik.uni-freiburg.de, ' 'joel.nothman@gmail.com') -__version__ = '2.3' +__version__ = '2.3.1' import re import sys @@ -171,7 +171,7 @@ def _build_re_values(): - quoted_re = r'''(?x) + quoted_re = r''' " # open quote followed by zero or more of: (?: (?``, where ``relation-name`` is a string. The string must start with alphabetic character and must be quoted if the name includes spaces, otherwise this method will raise a `BadRelationFormat` exception. This method must receive a normalized string, i.e., a string without - padding, including the "\r\n" characters. + padding, including the "\r\n" characters. :param s: a normalized string. :return: a string with the decoded relation name. @@ -670,12 +670,12 @@ def _decode_relation(self, s): def _decode_attribute(self, s): '''(INTERNAL) Decodes an attribute line. - The attribute is the most complex declaration in an arff file. All + The attribute is the most complex declaration in an arff file. All attributes must follow the template:: @attribute - where ``attribute-name`` is a string, quoted if the name contains any + where ``attribute-name`` is a string, quoted if the name contains any whitespace, and ``datatype`` can be: - Numerical attributes as ``NUMERIC``, ``INTEGER`` or ``REAL``. @@ -683,13 +683,13 @@ def _decode_attribute(self, s): - Dates (NOT IMPLEMENTED). - Nominal attributes with format: - {, , , ...} + {, , , ...} The nominal names follow the rules for the attribute names, i.e., they must be quoted if the name contains whitespaces. This method must receive a normalized string, i.e., a string without - padding, including the "\r\n" characters. + padding, including the "\r\n" characters. :param s: a normalized string. :return: a tuple (ATTRIBUTE_NAME, TYPE_OR_VALUES). @@ -874,8 +874,8 @@ def _encode_comment(self, s=''): def _encode_relation(self, name): '''(INTERNAL) Decodes a relation line. - The relation declaration is a line with the format ``@RELATION - ``, where ``relation-name`` is a string. + The relation declaration is a line with the format ``@RELATION + ``, where ``relation-name`` is a string. :param name: a string. :return: a string with the encoded relation declaration. @@ -901,7 +901,7 @@ def _encode_attribute(self, name, type_): - Dates (NOT IMPLEMENTED). - Nominal attributes with format: - {, , , ...} + {, , , ...} This method must receive a the name of the attribute and its type, if the attribute type is nominal, ``type`` must be a list of values. @@ -936,7 +936,7 @@ def encode(self, obj): def iter_encode(self, obj): '''The iterative version of `arff.ArffEncoder.encode`. - This encodes iteratively a given object and return, one-by-one, the + This encodes iteratively a given object and return, one-by-one, the lines of the ARFF file. :param obj: the object containing the ARFF information.