Language string | Code string | Query string | URI string | Relevance int64 | Notes string |
|---|---|---|---|---|---|
Python | interval = AsymmetricPercentileInterval(10.5, 70.5)
vmin, vmax = interval.get_limits(self.data)
np.testing.assert_allclose(vmin, -11.6)
np.testing.assert_allclose(vmax, 36.4) | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#test_asymmetric_percentile | 0 | |
Python | try:
return self[name]
except KeyError:
raise AttributeError(name) | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#__getattr__ | 1 | |
Python | if name == "_locked":
return super().__setattr__(name, True)
else:
if name == "__version__":
if cls._locked:
raise AttributeError("Version cannot be modified.")
return super().__setattr__(name, val)
err_msg = f"Bit flags a... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#__setattr__ | 1 | |
Python | if _ENABLE_BITFLAG_CACHING:
flagnames = cls._cache
else:
flagnames = {k.lower(): v for k, v in cls.__dict__.items()}
flagnames.update(
{k.lower(): v for b in cls.__bases__ for k, v in b.__dict__.items()}
)
try:
return flagnames[... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#__getattr__ | 1 | |
Python | filename = tmp_path / "test_simple.fits"
name, col = name_col
Table([col], names=[name]).write(
filename, format="hdf5", path="root", serialize_meta=True
) | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#test_fits_unsupported_mixin | 0 | |
Python | debug = "--debug" in sys.argv
cfg = defaultdict(list)
cfg["include_dirs"].append(numpy.get_include())
cfg["sources"].append(
os.path.join(os.path.dirname(__file__), "src", "compressionmodule.c")
)
if int(os.environ.get("ASTROPY_USE_SYSTEM_CFITSIO", 0)) or int(
os.environ.get("ASTRO... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#_get_compression_extension | 0 | |
Python | """
Automatically returns the values for the given keyword attribute for
all `Column`s in this list.
Implements for example self.units, self.formats, etc.
"""
cname = name[:-1]
if cname in KEYWORD_ATTRIBUTES and name[-1] == "s":
attr = []
for col ... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#__getattr__ | 1 | |
Python | if method in __all__:
return _make_io_func(method)
raise AttributeError(f"module {__name__!r} has no attribute {method!r}") | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#__getattr__ | 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... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#write | 0 | |
Python | """
Replace column ``name`` with the new ``col`` object.
The behavior of ``copy`` for Column objects is:
- copy=True: new class instance with a copy of data and deep copy of meta
- copy=False: new class instance with same data and a key-only copy of meta
For mixin columns:
... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#replace_column | 0 | |
Python | if not isinstance(self, MaskedColumn) and item == "mask":
raise AttributeError(
"cannot set mask value to a column in non-masked Table"
)
super().__setattr__(item, value)
if item == "unit" and issubclass(self.dtype.type, np.number):
try:
... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#__setattr__ | 1 | |
Python | matching_bounding_boxes = self._matching_bounding_boxes(argument, value)
if len(self.selector_args) == 1:
return matching_bounding_boxes[()]
else:
return CompoundBoundingBox(
matching_bounding_boxes,
self._model,
self.selector_args... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#_fix_input_selector_arg | 0 | |
Python | if isinstance(self, CompoundModel):
param_names = self._param_names
param_names = self.param_names
if param_names is not None and attr in self.param_names:
param = self.__dict__[attr]
value = _tofloat(value)
if param._validator is not None:
... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#__setattr__ | 1 | |
Python | """
If someone accesses an attribute not already defined, map the
parameters, and then see if the requested attribute is one of
the parameters
"""
# The following test is needed to avoid infinite recursion
# caused by deepcopy. There may be other such cases discovered.
... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#__getattr__ | 1 | |
Python | """One dimensional Lorentzian model derivative with respect to parameters"""
d_amplitude = fwhm**2 / (fwhm**2 + (x - x_0) ** 2)
d_x_0 = (
amplitude * d_amplitude * (2 * x - 2 * x_0) / (fwhm**2 + (x - x_0) ** 2)
)
d_fwhm = 2 * amplitude * d_amplitude / fwhm * (1 - d_amplitude... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#fit_deriv | 0 | |
Python | return getattr(self._file, attr) | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#__getattr__ | 1 | |
Python | return np.sinc(x.unmasked), x.mask.copy(), None | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#sinc | 0 | |
Python | data, mask = self._masked._get_data_and_mask(value, allow_ma_masked=True)
if data is not None:
self._dataiter[index] = data
self._maskiter[index] = mask | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#__setitem__ | 0 | |
Python | if name in __all__:
module_name = name[4:]
if module_name == "YAML":
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"PyYaml is now a strict dependency. HAS_YAML is deprecated as "
"of v5.0 and will be removed in a s... | Subclassed SkyCoord gives misleading attribute access message
I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus... | astropy_1a4462d72eb03f30dc83a879b1dd57aac8b2c18b#__getattr__ | 1 | |
Python | self.origin = origin | 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 | logging.Handler.__init__(self)
self.log_list = [] | 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 | try:
idx = sys.argv.index("--remote-data")
except ValueError:
pass
else:
sys.argv[idx] = "--remote-data=any"
try:
idx = sys.argv.index("-R")
except ValueError:
pass
else:
sys.argv[idx] = "-R=any"
re... | 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._exc = exc
self._ctx = 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 | super().__init__(record=True)
self.classes = classes | 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__()
if isinstance(category, type) and issubclass(category, Warning):
self.category = [category]
else:
self.category = category | 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.default_value = default_value
self.priority = priority | 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.base_path = os.path.abspath(base_path) | 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 hasattr(mappings, "__call__"):
mappings = [mappings]
WCS_FRAME_MAPPINGS.append(mappings) | 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 hasattr(mappings, "__call__"):
mappings = [mappings]
FRAME_WCS_MAPPINGS.append(mappings) | 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__(*args)
self.best_solution = best_solution
self.accuracy = accuracy
self.niter = niter
self.divergent = divergent
self.slow_conv = slow_conv
if kwargs:
warnings.warn(
f"Function received unexpected arguments ({list(kwargs)}) t... | 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 | close_fds = []
# these parameters are stored to be used when unpickling a WCS object:
self._init_kwargs = {
"keysel": copy.copy(keysel),
"colsel": copy.copy(colsel),
}
if header is None:
if naxis is None:
naxis = 2
wcsprm ... | 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 | """set essential parameters of the model (coord transformations)"""
assert nx > 2 and ny > 1 # a limitation of this particular simulation
self.nx = nx
self.ny = ny
self.crpix = crpix
self.crval = crval
self.cdelt = cdelt
self.pc = pc | 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__(*args, **kwargs)
self.foo = 42 | 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 not isinstance(low_level_wcs, BaseLowLevelWCS):
raise TypeError(
"Input to a HighLevelWCSWrapper must be a low level WCS object"
)
self._low_level_wcs = low_level_wcs | 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 | CTYPE_TO_UCD1_CUSTOM.insert(0, mapping)
self.mapping = mapping | 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 | slices = sanitize_slices(slices, wcs.pixel_n_dim)
if isinstance(wcs, SlicedLowLevelWCS):
# Here we combine the current slices with the previous slices
# to avoid ending up with many nested WCSes
self._wcs = wcs._wcs
slices_original = wcs._slices_array.copy()
... | 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._wcs = wcs | 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 = str(name) if name is not None else name
self.meta.update(meta or {}) | 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__(instance, cosmo_cls, "read", registry=readwrite_registry) | 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__(instance, cls, "write", registry=readwrite_registry) | 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__(instance, cosmo_cls, "read", registry=convert_registry) | 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__(instance, cls, "write", registry=convert_registry) | 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._attr_name = self._attr_name_private = None
self._derived = derived
self._format_spec = str(fmt) # deprecated.
self.__doc__ = doc
# units stuff
self._unit = u.Unit(unit) if unit is not None else None
self._equivalencies = equivalencies
# Parse registered ... | 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__(name=name, meta=meta)
self.H0 = H0
self.Tcmb0 = Tcmb0
self.m_nu = m_nu | 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__(70.0, 0.27, 0.73, Tcmb0=0.0, name="test_cos")
self._w0 = -0.9 | 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__(
70.0, 0.27, 0.73, Tcmb0=3.0, m_nu=0.1 * u.eV, name="test_cos_nu"
)
self._w0 = -0.8 | 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.wrapped = wrapped | 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__(
H0=H0,
Om0=Om0,
Ode0=Ode0,
Tcmb0=Tcmb0,
Neff=Neff,
m_nu=m_nu,
Ob0=Ob0,
name=name,
meta=meta,
)
self.w0 = w0
self.wz = wz
# Please see :ref:`astropy-cosmology-fas... | 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__(
H0=H0,
Om0=Om0,
Ode0=Ode0,
Tcmb0=Tcmb0,
Neff=Neff,
m_nu=m_nu,
Ob0=Ob0,
name=name,
meta=meta,
)
self.w0 = w0
# Please see :ref:`astropy-cosmology-fast-integrals` for disc... | 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__(
H0=H0,
Om0=Om0,
Ode0=0.0,
w0=w0,
Tcmb0=Tcmb0,
Neff=Neff,
m_nu=m_nu,
Ob0=Ob0,
name=name,
meta=meta,
)
# Please see :ref:`astropy-cosmology-fast-integrals` for discuss... | 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__(
H0=H0,
Om0=Om0,
Ode0=Ode0,
Tcmb0=Tcmb0,
Neff=Neff,
m_nu=m_nu,
Ob0=Ob0,
name=name,
meta=meta,
)
self.w0 = w0
self.wa = wa
# Please see :ref:`astropy-cosmology-fas... | 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__(
H0=H0,
Om0=Om0,
Ode0=0.0,
w0=w0,
wa=wa,
Tcmb0=Tcmb0,
Neff=Neff,
m_nu=m_nu,
Ob0=Ob0,
name=name,
meta=meta,
)
# Please see :ref:`astropy-cosmology-fast-int... | 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__(name=name, meta=meta)
# Assign (and validate) Parameters
self.H0 = H0
self.Om0 = Om0
self.Ode0 = Ode0
self.Tcmb0 = Tcmb0
self.Neff = Neff
self.m_nu = m_nu # (reset later, this is just for unit validation)
self.Ob0 = Ob0 # (must be after... | 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__(*args, **kw) # guaranteed not to have `Ode0`
# Do some twiddling after the fact to get flatness
self._Ok0 = 0.0
self._Ode0 = 1.0 - (self._Om0 + self._Ogamma0 + self._Onu0 + self._Ok0) | 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__(
H0=H0,
Om0=Om0,
Ode0=Ode0,
Tcmb0=Tcmb0,
Neff=Neff,
m_nu=m_nu,
Ob0=Ob0,
name=name,
meta=meta,
)
self.wp = wp
self.wa = wa
self.zp = zp
# Please see :ref:`... | 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__(
H0=H0,
Om0=Om0,
Ode0=Ode0,
Tcmb0=Tcmb0,
Neff=Neff,
m_nu=m_nu,
Ob0=Ob0,
name=name,
meta=meta,
)
# Please see :ref:`astropy-cosmology-fast-integrals` for discussion
# abou... | 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__(
H0=H0,
Om0=Om0,
Ode0=0.0,
Tcmb0=Tcmb0,
Neff=Neff,
m_nu=m_nu,
Ob0=Ob0,
name=name,
meta=meta,
)
# Please see :ref:`astropy-cosmology-fast-integrals` for discussion
# about... | 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 Cosmology instance using ``Cosmology.read()``."""
return Cosmology.read | 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 Cosmology using ``.write()``."""
return cosmo.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#write | 1 | |
Python | """Read Cosmology from file using function ``read``."""
def use_read(*args, **kwargs):
kwargs.pop("format", None) # specific to Cosmology.from_format
return self.functions["read"](*args, **kwargs)
return use_read | 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 Cosmology to file using function ``write``."""
def use_write(*args, **kwargs):
return self.functions["write"](cosmo, *args, **kwargs)
return use_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#write | 1 | |
Python | methods = get_redshift_methods(cosmo, include_private=False, include_z2=True)
# dynamically detect ABC and optional dependencies
for n in tuple(methods):
params = inspect.signature(getattr(cosmo, n)).parameters.keys()
ERROR_SEIVE = (NotImplementedError, ValueError)
... | 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#method_name | 0 | |
Python | self.log = log
SimpleXMLRPCServer.__init__(
self, addr, requestHandler, logRequests, allow_none, encoding
) | 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._id = str(uuid.uuid1())
# General settings
self._is_running = False
self._customlockfilename = lockfile
self._lockfile = None
self._addr = addr
self._port = port
self._mode = mode
self._label = label
self._timeout = timeout
self._clie... | 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.__proxies = proxies
self.__name = 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 | self._proxies = queue.Queue(size)
for i in range(size):
self._proxies.put(proxy_class(*args, **keywords)) | 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.cli = cli | 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._handler = handler | 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.__send = send
self.__name = 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 | self.hub = SAMPHubProxy()
self.client_arguments = {
"name": name,
"description": description,
"metadata": metadata,
"addr": addr,
"port": port,
"callable": callable,
}
"""
Collected arguments that should be passed o... | 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._is_running = False
self._is_registered = False
if metadata is None:
metadata = {}
if name is not None:
metadata["samp.name"] = name
if description is not None:
metadata["samp.description.text"] = description
self._metadata = metadata
... | 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.proxy = None
self._connected = 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 | self.clients = []
ThreadingXMLRPCServer.__init__(
self, addr, log, requestHandler, logRequests, allow_none, encoding
) | 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.client = client | 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.polling = True
WebProfileDialog.__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 | self._is_running = False
self._is_registered = False
if metadata is None:
metadata = {}
if name is not None:
metadata["samp.name"] = name
if description is not None:
metadata["samp.description.text"] = description
self._metadata = metadata
... | 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.hub = SAMPWebHubProxy()
self.client = SAMPWebClient(self.hub, name, description, metadata, callable) | 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 isinstance(init, _UnitRegistry):
# If passed another registry we don't need to rebuild everything.
# but because these are mutable types we don't want to create
# conflicts so everything needs to be copied.
self._equivalencies = init._equivalencies.copy()
s... | 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 | _unit_registries.append(_UnitRegistry(init=init, equivalencies=equivalencies)) | 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 | UnitBase.__init__(self)
if isinstance(st, (bytes, str)):
self._names = [st]
self._short_names = [st]
self._long_names = []
elif isinstance(st, tuple):
if not len(st) == 2:
raise ValueError("st must be string, list or 2-tuple")
... | 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 | represents = Unit(represents)
self._represents = represents
NamedUnit.__init__(self, st, namespace=namespace, doc=doc, format=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#__init__ | 1 | |
Python | if _error_check:
for base in bases:
if not isinstance(base, UnitBase):
raise TypeError("bases must be sequence of UnitBase instances")
powers = [validate_power(p) for p in powers]
if not decompose and len(bases) == 1 and powers[0] >= 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 | self._unit = _replace_temperatures_with_kelvin(unit)
self._physical_type_id = self._unit._get_physical_type_id()
self._physical_type = _standardize_physical_type_names(physical_types)
self._physical_type_list = sorted(self._physical_type) | 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._quantity = q
self._dataiter = q.view(np.ndarray).flat | 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.equivalencies = kwargs.pop("equivalencies", [])
self.decorator_kwargs = kwargs
self.strict_dimensionless = strict_dimensionless | 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.data = equiv_list
self.name = [name]
self.kwargs = [kwargs] if kwargs is not None else [dict()] | 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.value = value
self.unit = unit | 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 physical_unit is None:
physical_unit = dimensionless_unscaled
else:
physical_unit = Unit(physical_unit)
if not isinstance(physical_unit, UnitBase) or physical_unit.is_equivalent(
self._default_function_unit
):
raise UnitConversio... | 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.assignments = assignments | 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.modules = {}
self.UNSUPPORTED = set() # Upper-case for backwards compatibility
self._lock = threading.RLock()
super().__init__(*args, **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 | super().__init__(bound)
# If bound to a data object instance then create the dict of attributes
# which stores the info attribute values.
if bound:
# Specify how to serialize this object depending on context.
# If ``True`` for a context, then use formatted ``value`` attr... | 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 location is not None:
from astropy.coordinates import EarthLocation
if isinstance(location, EarthLocation):
self.location = location
else:
self.location = EarthLocation(*location)
if self.location.size == 1:
self.locatio... | 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 isinstance(val, TimeDelta):
if scale is not None:
self._set_scale(scale)
else:
format = format or self._get_format(val)
self._init_from_vals(val, val2, format, scale, copy)
if scale is not None:
self.SCALES = TIME_DELTA_TYPES[sc... | 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 | op_string = "" if op is None else f" for {op}"
super().__init__(
"Unsupported operand type(s){}: '{}' and '{}'".format(
op_string, left.__class__.__name__, right.__class__.__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 | self.scale = scale # validation of scale done later with _check_scale
self.precision = precision
self.in_subfmt = in_subfmt
self.out_subfmt = out_subfmt
self._jd1, self._jd2 = None, None
if from_jd:
self.jd1 = val1
self.jd2 = val2
else:
... | 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
----------
utc_offset : `~astropy.units.Quantity`, optional
Offset from UTC in days. Defaults to zero.
dst : `~astropy.units.Quantity`, optional
Daylight Savings Time offset in days. Defaults to zero
(no daylight savings).
tzname... | 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.data = np.array(data, copy=True)
if self.data.ndim != 1:
raise ValueError("data should be 1-dimensional")
self.data.sort()
self.n = self.data.size
# import here rather than globally: scipy is an optional dependency.
# Note that scipy is imported in the function ... | 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.p0 = p0
self.gamma = gamma
self.ncp_prior = ncp_prior | 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.dt = dt
super().__init__(p0, gamma, ncp_prior) | 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__(p0, gamma, ncp_prior) | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.