def test01_readTableChar(self):
        """Checking column conversion into NumPy in read().

        Char flavor

        """

        table = self.h5file.root.table
        table.flavor = "numpy"
        for colname in table.colnames:
            numcol = table.read(field=colname)
            typecol = table.coltypes[colname]
            itemsizecol = table.description._v_dtypes[colname].base.itemsize
            nctypecode = numcol.dtype.char
            if typecol == "string":
                if itemsizecol > 1:
                    orignumcol = np.array(['abcd']*self.nrows, dtype='S4')
                else:
                    orignumcol = np.array(['a']*self.nrows, dtype='S1')
                if common.verbose:
                    print("Typecode of NumPy column read:", nctypecode)
                    print("Should look like:", 'c')
                    print("Itemsize of column:", itemsizecol)
                    print("Shape of NumPy column read:", numcol.shape)
                    print("Should look like:", orignumcol.shape)
                    print("First 3 elements of read col:", numcol[:3])
                # Check that both NumPy objects are equal
                self.assertTrue(allequal(numcol, orignumcol, "numpy"))
dataset/ETHPy150Open PyTables/PyTables/tables/tests/test_numpy.py/TableReadTestCase.test01_readTableChar/original