Language string | Code string | Query string | URI string | Relevance int64 | Notes string |
|---|---|---|---|---|---|
Python | self._raw_cards = cards
self._keys = list(cards.keys())
# dict of (keyword, Card object) storing the parsed cards
self._cards = {}
# the _BasicHeaderCards object allows to access Card objects from
# keyword indices
self.cards = _BasicHeaderCards(self)
self._modif... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self._header = header | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | super().__init__(header)
self._keyword = keyword
self._count = self._header.count(self._keyword)
self._indices = slice(self._count).indices(self._count) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self.hdu = weakref.proxy(hdu)
self.field = field | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self._keyword = keyword
self._validator = None
# The name of the attribute associated with this keyword is currently
# determined from the KEYWORD_NAMES/ATTRIBUTES lists. This could be
# make more flexible in the future, for example, to support custom
# column attributes.
... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Construct a `Column` by specifying attributes. All attributes
except ``format`` can be optional; see :ref:`astropy:column_creation`
and :ref:`astropy:creating_ascii_table` for more information regarding
``TFORM`` keyword.
Parameters
----------
name : str, op... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Parameters
----------
input : sequence of `Column` or `ColDefs` or ndarray or `~numpy.recarray`
An existing table HDU, an existing `ColDefs`, or any multi-field
Numpy array or `numpy.recarray`.
ascii : bool
Use True to ensure that ASCII table col... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | super().__init__(input)
# if the format of an ASCII column has no width, add one
if not isinstance(input, _AsciiColDefs):
self._update_field_metrics()
else:
for idx, s in enumerate(input.starts):
self.columns[idx].start = s
self._spans = inpu... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
The ``_BaseDiff`` class does not implement a ``_diff`` method and
should not be instantiated directly. Instead instantiate the
appropriate subclass of ``_BaseDiff`` for the objects being compared
(for example, use `HeaderDiff` to compare two `Header` objects.
"""
sel... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Parameters
----------
a : str or `HDUList`
The filename of a FITS file on disk, or an `HDUList` object.
b : str or `HDUList`
The filename of a FITS file on disk, or an `HDUList` object to
compare to the first file.
ignore_hdus : sequence,... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Parameters
----------
a : BaseHDU
An HDU object.
b : BaseHDU
An HDU object to compare to the first HDU object.
ignore_keywords : sequence, optional
Header keywords to ignore when comparing two headers; the presence
of these ke... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Parameters
----------
a : `~astropy.io.fits.Header` or string or bytes
A header.
b : `~astropy.io.fits.Header` or string or bytes
A header to compare to the first header.
ignore_keywords : sequence, optional
Header keywords to ignore when... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Parameters
----------
a : BaseHDU
An HDU object.
b : BaseHDU
An HDU object to compare to the first HDU object.
numdiffs : int, optional
The number of pixel/table values to output when reporting HDU data
differences. Though th... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Parameters
----------
a : BaseHDU
An HDU object.
b : BaseHDU
An HDU object to compare to the first HDU object.
numdiffs : int, optional
The number of pixel/table values to output when reporting HDU data
differences. Though th... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Parameters
----------
a : BaseHDU
An HDU object.
b : BaseHDU
An HDU object to compare to the first HDU object.
ignore_fields : sequence, optional
The (case-insensitive) names of any table columns to ignore if any
table data is... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | pass | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | if keyword is None and "key" in kwargs:
keyword = kwargs["key"]
self._keyword = None
self._value = None
self._comment = None
self._valuestring = None
self._image = None
# This attribute is set to False when creating the card from a card
# image to en... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | super().__init__(self, *args, **kwargs)
self._buffer = np.asarray(data).tobytes()
self._data_offset = 0 | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/148
Test that saving an update where the header is shorter than the
original header doesn't leave a stump from the old header in the file.
"""
data = np.arange(100)
hdu = fits.PrimaryHDU(data=data)
... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#test_update_with_truncated_header | 0 | |
Python | st = np.zeros(3, [("f1", "i4"), ("f2", "S6"), ("f3", ">2f8")])
np.random.seed(35)
st["f1"] = [1, 3, 5]
st["f2"] = ["hello", "world", "byebye"]
st["f3"] = np.random.random(st["f3"].shape)
return st | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#get_test_data | 0 | |
Python | if nargs is not None:
raise ValueError("nargs not allowed")
super().__init__(option_strings, dest, nargs, **kwargs) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self.filename = filename
self.verbose = verbose
self._hdulist = fits.open(filename) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Construct a `StreamingHDU` object given a file name and a header.
Parameters
----------
name : path-like or file-like
The file to which the header and data will be streamed. If opened,
the file object must be opened in a writeable binary mode such as
... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Write the given data to the stream.
Parameters
----------
data : ndarray
Data to stream to the file.
Returns
-------
writecomplete : int
Flag that when `True` indicates that all of the required
data has been written to the... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | super().__init__(data=data, header=header, name=name, ver=ver)
self._uint = uint
self._character_as_bytes = character_as_bytes
if data is DELAYED:
# this should never happen
if header is None:
raise ValueError("No header to setup HDU.")
# if... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | super().__init__(
data, header, name=name, ver=ver, character_as_bytes=character_as_bytes
) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | from astropy.table import Table
if isinstance(data, Table):
from astropy.io.fits.convenience import table_to_hdu
hdu = table_to_hdu(data)
if header is not None:
hdu.header.update(header)
data = hdu.data
header = hdu.header
su... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | if header is None:
header = Header()
self._header = header
self._header_str = None
self._file = None
self._buffer = None
self._header_offset = None
self._data_offset = None
self._data_size = None
# This internal variable is used to track wheth... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | super().__init__(data=data, header=header)
if header is not None and not isinstance(header, (Header, _BasicHeader)):
# TODO: Instead maybe try initializing a new Header object from
# whatever is passed in as the header--there are various types
# of objects that could work fo... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self._cards = image_header._cards
self._keyword_indices = image_header._keyword_indices
self._rvkc_indices = image_header._rvkc_indices
self._modified = image_header._modified
self._table_header = table_header | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Parameters
----------
data : array, optional
Uncompressed image data
header : `~astropy.io.fits.Header`, optional
Header to be associated with the image; when reading the HDU from a
file (data=DELAYED), the header read from the file
name ... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | from .groups import GroupsHDU
super().__init__(data=data, header=header)
if data is DELAYED:
# Presumably if data is DELAYED then this HDU is coming from an
# open file, and was not created in memory
if header is None:
# this should never happen
... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self.hdu = hdu | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Construct a primary HDU.
Parameters
----------
data : array or ``astropy.io.fits.hdu.base.DELAYED``, optional
The data in the HDU.
header : `~astropy.io.fits.Header`, optional
The header to be used (as a template). If ``header`` is `None`, a
... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Construct an image HDU.
Parameters
----------
data : array
The data in the HDU.
header : `~astropy.io.fits.Header`
The header to be used (as a template). If ``header`` is
`None`, a minimal header will be provided.
name : str, op... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | if _is_int(indx):
if indx < 0: # support negative indexing
indx = indx + naxis
if 0 <= indx < naxis:
self.npts = 1
self.offset = indx
self.contiguous = True
else:
raise IndexError(f"Index {indx} out of r... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Construct a `HDUList` object.
Parameters
----------
hdus : BaseHDU or sequence thereof, optional
The HDU object(s) to comprise the `HDUList`. Should be
instances of HDU classes like `ImageHDU` or `BinTableHDU`.
file : file-like, bytes, optional
... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | super().__init__(input, row, start, end, step, base) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | super().__init__(data=data, header=header)
if data is not DELAYED:
self.update_header()
# Update the axes; GROUPS HDUs should always have at least one axis
if len(self._axes) <= 0:
self._axes = [0]
self._header["NAXIS"] = 1
self._header.set("NAXIS... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | super().__init__() # set _identifiers
self._readers = OrderedDict()
self._registries["read"] = dict(attr="_readers", column="Read")
self._registries_order = ("read", "identify") | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Read in data.
Parameters
----------
cls : class
*args
The arguments passed to this method depend on the format.
format : str or None
cache : bool
Whether to cache the results of reading in the data.
**kwargs
The arg... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#read | 1 | |
Python | super().__init__()
self._writers = OrderedDict()
self._registries["write"] = dict(attr="_writers", column="Write")
self._registries_order = ("write", "identify") | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Write out data.
Parameters
----------
data : object
The data to write.
*args
The arguments passed to this method depend on the format.
format : str or None
**kwargs
The arguments passed to this method depend on the format.
... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | super().__init__()
self._registries_order = ("read", "write", "identify") | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self._identifiers = OrderedDict()
# what this class can do: e.g. 'read' &/or 'write'
self._registries = dict()
self._registries["identify"] = dict(attr="_identifiers", column="Auto-identify")
self._registries_order = ("identify",) # match keys in `_registries`
# If multiple fo... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | if registry is None:
from astropy.io.registry.compat import default_registry as registry
self._registry = registry
self._instance = instance
self._cls = cls
self._method_name = method_name # 'read' or 'write' | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Write header information in the ECSV ASCII format.
This function is called at the point when preprocessing has been done to
convert the input table columns to `self.cols` which is a list of
`astropy.io.ascii.core.Column` objects. In particular `col.str_vals`
is available for... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | core.BaseHeader.__init__(self) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | core.BaseData.__init__(self)
self.is_multiline = False | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | core.BaseReader.__init__(self)
# The inputter needs to know about the data (see DaophotInputter.process_lines)
self.inputter.data = self.data | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | raise NotImplementedError | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | super().__init__()
self.table_id = table_id
self.names = names
self.err_specs = err_specs
self.delimiter = sep | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self.lines = self.inputter.get_lines(table, newline="\n")
return _read_table_qdp(
self.lines,
table_id=self.table_id,
names=self.names,
delimiter=self.delimiter,
) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#read | 1 | |
Python | self._check_multidim_table(table)
lines = _write_table_qdp(table, err_specs=self.err_specs)
return lines | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | if "col_align" not in self.latex:
self.latex["col_align"] = len(self.cols) * "c"
if "tablealign" in self.latex:
align = "[" + self.latex["tablealign"] + "]"
else:
align = ""
if self.latex["tabletype"] is not None:
lines.append(r"\begin{" + self.lat... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | add_dictval_to_list(self.latex, "data_start", lines)
core.BaseData.write(self, lines)
add_dictval_to_list(self.latex, "data_end", lines)
lines.append(self.data_end)
add_dictval_to_list(self.latex, "tablefoot", lines)
if self.latex["tabletype"] is not None:
lines.appen... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | super().__init__()
self.latex = {}
# The latex dict drives the format of the table and needs to be shared
# with data and header
self.header.latex = self.latex
self.data.latex = self.latex
self.latex["tabletype"] = "table"
self.latex.update(latexdict)
if ... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self.header.start_line = None
self.data.start_line = None
return core.BaseReader.write(self, table=table) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | if "col_align" not in self.latex:
self.latex["col_align"] = len(self.cols) * "c"
if "tablealign" in self.latex:
align = "[" + self.latex["tablealign"] + "]"
else:
align = ""
lines.append(
r"\begin{"
+ self.latex["tabletype"]
... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | lines.append(self.data_start)
lines_length_initial = len(lines)
core.BaseData.write(self, lines)
# To remove extra space(s) and // appended which creates an extra new line
# in the end.
if len(lines) > lines_length_initial:
lines[-1] = re.sub(r"\s* \\ \\ \s* $", "", l... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | super().__init__(**kwargs)
# check if tabletype was explicitly set by the user
if not (("latexdict" in kwargs) and ("tabletype" in kwargs["latexdict"])):
self.latex["tabletype"] = "deluxetable" | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | vals, starts, ends = super().get_fixedwidth_params(line)
# The right hand column can be unbounded
ends[-1] = None
return vals, starts, ends | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#get_fixedwidth_params | 1 | |
Python | super().__init__(delimiter_pad=None, bookend=False) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | lines = super().write(lines)
lines = [lines[1]] + lines + [lines[1]]
return lines | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | super().__init__()
self.header.readme = readme | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """Not available for the CDS class (raises NotImplementedError)"""
raise NotImplementedError | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | if self.data.start_line == "guess":
# Replicate the first part of BaseReader.read up to the point where
# the table lines are initially read in.
with suppress(TypeError):
# For strings only
if os.linesep not in table + "":
self.data... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#read | 1 | |
Python | if (
default_kwargs.get("header_start", 0) is not None
and user_kwargs.get("header_start", 0) is None
):
raise ValueError("header_start cannot be set to None for this Reader")
# Set up kwargs and copy any user kwargs. Use deepcopy user kwargs
# since they ma... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Read input data (file-like object, filename, list of strings, or
single string) into a Table and return the result.
"""
if self.comment is not None and len(self.comment) != 1:
raise core.ParameterError("The C reader does not support a comment regex")
elif self.dat... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#read | 1 | |
Python | """
Use a fast Cython method to write table data to output,
where output is a filename or file-like object.
"""
self._write(table, output, {}) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | super().__init__({"delimiter": ",", "comment": None}, **kwargs) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Override the default write method of `FastBasic` to
output masked values as empty fields.
"""
self._write(table, output, {"fill_values": [(core.masked, "")]}) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | super().__init__({"delimiter": "\t"}, **kwargs)
self.strip_whitespace_lines = False
self.strip_whitespace_fields = False | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | super().__init__({"header_start": None, "data_start": 0}, **kwargs) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Override the default writing behavior in `FastBasic` so
that columns names are not included in output.
"""
self._write(table, output, {}, header_output=None) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | super().__init__({}, **kwargs)
# Mimic CommentedHeader's behavior in which data_start
# is relative to header_start if unspecified; see #2692
if "data_start" not in kwargs:
self.data_start = 0 | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Override the default writing behavior in `FastBasic` so
that column names are commented.
"""
self._write(table, output, {}, header_output="comment") | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | super().__init__({"delimiter": "\t", "data_start": 2}, **kwargs)
self.strip_whitespace_lines = False
self.strip_whitespace_fields = False | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Override the default writing behavior in `FastBasic` to
output a line with column types after the column name line.
"""
self._write(table, output, {}, output_types=True) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | self.csvfile = csvfile
# Temporary StringIO for catching the real csv.writer() object output
self.temp_out = StringIO()
self.writer = csv.writer(self.temp_out, **kwargs)
dialect = self.writer.dialect
self.quotechar2 = dialect.quotechar * 2
self.quote_empty = (dialect.qu... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self.name = name
self.type = NoType # Generic type (Int, Float, Str etc)
self.dtype = None # Numpy dtype if available
self.str_vals = []
self.fill_values = {}
self.shape = []
self.subtype = None | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self.splitter = self.splitter_class() | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | if self.start_line is not None:
for i, spacer_line in zip(
range(self.start_line), itertools.cycle(self.write_spacer_lines)
):
lines.append(spacer_line)
lines.append(self.splitter.join([x.info.name for x in self.cols])) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | self.fill_values = copy.copy(self.fill_values)
self.formats = copy.copy(self.formats)
self.splitter = self.splitter_class() | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """Write ``self.cols`` in place to ``lines``.
Parameters
----------
lines : list
List for collecting output of writing self.cols.
"""
if hasattr(self.start_line, "__call__"):
raise TypeError("Start_line attribute cannot be callable for write()")
e... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | super().__init__(name, bases, dct)
format = dct.get("_format_name")
if format is None:
return
fast = dct.get("_fast")
if fast is not None:
FAST_CLASSES[format] = cls
FORMAT_CLASSES[format] = cls
io_formats = ["ascii." + format] + dct.get("_io_r... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self.header = self.header_class()
self.data = self.data_class()
self.inputter = self.inputter_class()
self.outputter = self.outputter_class()
# Data and Header instances benefit from a little cross-coupling. Header may need to
# know about number of data columns for auto-column ... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """Read the ``table`` and return the results in a format determined by
the ``outputter`` attribute.
The ``table`` parameter is any string or object that can be processed
by the instance ``inputter``. For the base Inputter class ``table`` can be
one of:
* File name
* Fi... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#read | 1 | |
Python | """
Write ``table`` as list of strings.
Parameters
----------
table : `~astropy.table.Table`
Input table data.
Returns
-------
lines : list
List of strings corresponding to ASCII table
"""
# Check column names before alt... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | """
Writes the Header of the MRT table, aka ReadMe, which
also contains the Byte-By-Byte description of the table.
"""
from astropy.coordinates import SkyCoord
# Recognised ``SkyCoord.name`` forms with their default column names (helio* require SunPy).
coord_systems = {
... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | self.splitter.delimiter = " "
fixedwidth.FixedWidthData.write(self, lines) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | if len(table) == 0:
raise NotImplementedError
self.data.header = self.header
self.header.position_line = None
self.header.start_line = None
# Create a copy of the ``table``, so that it the copy gets modified and
# written to the file, while the original table remain... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | self.soup = val | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self.out = out | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | self.out.append(data) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | """
Initialize classes for HTML reading and writing.
"""
super().__init__()
self.html = deepcopy(htmldict)
if "multicol" not in htmldict:
self.html["multicol"] = True
if "table_id" not in htmldict:
self.html["table_id"] = 1
self.inputter.ht... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#__init__ | 1 | |
Python | """
Read the ``table`` in HTML format and return a resulting ``Table``.
"""
self.outputter = HTMLOutputter()
return super().read(table) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#read | 1 | |
Python | """
Return data in ``table`` converted to HTML as a list of strings.
"""
# Check that table has only 1-d or 2-d columns. Above that fails.
self._check_multidim_table(table)
cols = list(table.columns.values())
self.data.header.cols = cols
self.data.cols = cols
... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | lines.append(self.write_comment + self.splitter.join(self.colnames)) | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#write | 1 | |
Python | """
Read input data (file-like object, filename, list of strings, or
single string) into a Table and return the result.
"""
out = super().read(table)
# Strip off the comment line set as the header line for
# commented_header format (first by default).
if "comment... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | astropy_a5917978be39d13cd90b517e1de4e7a539ffaa48#read | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.