'Regression test for
https://github.com/spacetelescope/PyFITS/issues/3'

def test_new_table_with_nd_column(self):

    arra = np.array(['a', 'b'], dtype='|S1')
    arrb = np.array([['a', 'bc'], ['cd', 'e']], dtype='|S2')
    arrc = np.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])
    cols = [fits.Column(name='str', format='1A', array=arra), fits.Column(name='strarray', format='4A', dim='(2,2)', array=arrb), fits.Column(name='intarray', format='4I', dim='(2,    2)', array=arrc)]
    hdu = fits.BinTableHDU.from_columns(fits.ColDefs(cols))
    hdu.writeto(self.temp('test.fits'))
    with fits.open(self.temp('test.fits')) as h:
        assert (h[1].data['str'].encode('ascii') == arra).all()
        assert (h[1].data['strarray'].encode('ascii') == arrb).all()
        assert (h[1].data['intarray'] == arrc).all()
