<commit_before>from __future__ import absolute_import
# This file defines the Concrete Array --- a leaf node in the expression graph
#
# A concrete array is constructed from a Data Descriptor Object which handles the
#  indexing and basic interpretation of bytes
#

from . import blz
import numpy as np
from .datashape import dshape
from .datadescriptor import IDataDescriptor
from ._printing import array2string as _printer

# An Array contains:
#   DataDescriptor
#       Sequence of Bytes (where are the bytes)
#       Index Object (how do I get to them)
#       Data Shape Object (what are the bytes? how do I interpret them)
#
#   axis and dimension labels 
#   user-defined meta-data (whatever are needed --- provenance propagation)
class Array(object):

    @property
    def dshape(self):
        return self._data.dshape

    def __iter__(self, iter):
        return self._data.__iter__()

    def __getitem__(self, key):
        return Array(self._data.__getitem__(key))

    def __setitem__(self, key, val):
        self._data.__setitem__(key, val)

    def __len__(self):
        return self._data.dshape[0]

    def __str__(self):
        return _printer(self._data)

    def __repr__(self):<commit_msg>__iter__() does not take params<commit_after>from __future__ import absolute_import
# This file defines the Concrete Array --- a leaf node in the expression graph
#
# A concrete array is constructed from a Data Descriptor Object which handles the
#  indexing and basic interpretation of bytes
#

from . import blz
import numpy as np
from .datashape import dshape
from .datadescriptor import IDataDescriptor
from ._printing import array2string as _printer

# An Array contains:
#   DataDescriptor
#       Sequence of Bytes (where are the bytes)
#       Index Object (how do I get to them)
#       Data Shape Object (what are the bytes? how do I interpret them)
#
#   axis and dimension labels 
#   user-defined meta-data (whatever are needed --- provenance propagation)
class Array(object):

    @property
    def dshape(self):
        return self._data.dshape

    def __iter__(self):
        return self._data.__iter__()

    def __getitem__(self, key):
        return Array(self._data.__getitem__(key))

    def __setitem__(self, key, val):
        self._data.__setitem__(key, val)

    def __len__(self):
        return self._data.dshape[0]

    def __str__(self):
        return _printer(self._data)

    def __repr__(self):
{'fraction_non_alphanumeric': 0.0748772504091653, 'fraction_numerical': 0.0016366612111292963, 'mean_word_length': 3.259581881533101, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2917560', 'n_tokens_mistral': 704, 'n_tokens_neox': 681, 'n_words': 266}