Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In [39]: from astropy.table import Table
- In [40]: a = [1, 4, 5]
- In [41]: b = [2.0, 5.0, 8.2]
- In [42]: c = ['x', 'y', 'z']
- In [44]: t = Table([a, b, c], names=('First', 'Second', 'Third'), meta={'name': 'First Table'})
- In [45]: t
- Out[45]:
- <Table rows=3 names=('First','Second','Third')>
- array([(1, 2.0, 'x'), (4, 5.0, 'y'), (5, 8.2, 'z')],
- dtype=[('First', '<i4'), ('Second', '<f8'), ('Third', 'S1')])
- In [46]: print(t)
- ---------------------------------------------------------------------------
- IndexError Traceback (most recent call last)
- <ipython-input-46-d6c4f5caf31e> in <module>()
- ----> 1 print(t)
- /home/pritishc/RestOfFileSystem/Astropy Repo/astropy/astropy/table/table.py in __bytes__(self)
- 660
- 661 def __bytes__(self):
- --> 662 return six.text_type(self).encode('utf-8')
- 663 if six.PY2:
- 664 __str__ = __bytes__
- /home/pritishc/RestOfFileSystem/Astropy Repo/astropy/astropy/table/table.py in __unicode__(self)
- 654
- 655 def __unicode__(self):
- --> 656 lines, n_header = self.formatter._pformat_table(self)
- 657 return '\n'.join(lines)
- 658 if six.PY3:
- /home/pritishc/RestOfFileSystem/Astropy Repo/astropy/astropy/table/pprint.py in _pformat_table(self, table, max_lines, max_width, show_name, show_unit, html, tableid)
- 282 # "Print" all the values into temporary lists by column for subsequent
- 283 # use and to determine the width
- --> 284 max_lines, max_width = self._get_pprint_size(max_lines, max_width)
- 285 cols = []
- 286
- /home/pritishc/RestOfFileSystem/Astropy Repo/astropy/astropy/table/pprint.py in _get_pprint_size(max_lines, max_width)
- 97 """
- 98 if max_lines is None or max_width is None:
- ---> 99 lines, width = terminal_size()
- 100
- 101 if max_lines is None:
- /home/pritishc/RestOfFileSystem/Astropy Repo/astropy/astropy/utils/console.pyc in terminal_size(file)
- 128 except TypeError:
- 129 # fall back on configuration variables
- --> 130 return conf.max_lines, conf.max_width
- 131
- 132
- /home/pritishc/RestOfFileSystem/Astropy Repo/astropy/astropy/config/configuration.pyc in __get__(self, obj, objtype)
- 274 if obj is None:
- 275 return self
- --> 276 return self()
- 277
- 278 def set(self, value):
- /home/pritishc/RestOfFileSystem/Astropy Repo/astropy/astropy/config/configuration.pyc in __call__(self)
- 401 "is deprecated. Use '{3}' in section [{4}] instead.".format(
- 402 name, module, get_config_filename(filename),
- --> 403 self.name, self.module.split('.', 1)[1]),
- 404 AstropyDeprecationWarning)
- 405 options.append((sec[name], module, name))
- IndexError: list index out of range
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement