Skip to content

Instantly share code, notes, and snippets.

@MSeifert04
Created August 10, 2016 15:34
Show Gist options
  • Save MSeifert04/ab626b64f2de196b3852d2c7765b82ac to your computer and use it in GitHub Desktop.
Save MSeifert04/ab626b64f2de196b3852d2c7765b82ac to your computer and use it in GitHub Desktop.
================================== FAILURES ===================================
______________________ TestSDSSRemote.test_sdss_specobj _______________________
self = <astroquery.sdss.tests.test_sdss_remote.TestSDSSRemote object at 0x000001F802A543C8>
def test_sdss_specobj(self):
colnames = ['ra', 'dec', 'objid', 'run', 'rerun', 'camcol', 'field',
'z', 'plate', 'mjd', 'fiberID', 'specobjid', 'run2d',
'instrument']
dtypes = [float, float, int, int, int, int, int, float, int, int, int,
int, int, bytes]
data = [
[46.8390680395307, 5.16972676625711, 1237670015125750016, 5714,
301, 2, 185, -0.0006390358, 2340, 53733, 291, 2634685834112034816,
26, 'SDSS'],
[46.8705377929765, 5.42458826592292, 1237670015662621224, 5714,
301, 3, 185, 0, 2340, 53733, 3, 2634606669274834944, 26, 'SDSS'],
[46.8899751105478, 5.09432755808192, 1237670015125815346, 5714,
301, 2, 186, -4.898809E-05, 2340, 53733, 287, 2634684734600407040,
26, 'SDSS'],
[46.8954031261838, 5.9739184644185, 1237670016199491831, 5714,
301, 4, 185, 0, 2340, 53733, 329, 2634696279472498688, 26,
'SDSS'],
[46.9155836662379, 5.50671723824944, 1237670015662686398, 5714,
301, 3, 186, 0, 2340, 53733, 420, 2634721293362030592, 26,
'SDSS']]
table = Table(data=[x for x in zip(*data)],
> names=colnames, dtype=dtypes)
astroquery\sdss\tests\test_sdss_remote.py:100:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
c:\-\git\astropy\astropy\table\table.py:371: in __init__
init_func(data, names, dtype, n_cols, copy)
c:\-\git\astropy\astropy\table\table.py:628: in _init_from_list
copy=copy, copy_indices=self._init_indices)
c:\-\git\astropy\astropy\table\column.py:706: in __new__
copy=copy, copy_indices=copy_indices)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'astropy.table.column.Column'>
data = (1237670015125750016, 1237670015662621224, 1237670015125815346, 1237670016199491831, 1237670015662686398)
name = 'objid', dtype = <class 'int'>, shape = (), length = 0
description = None, unit = None, format = None, meta = None, copy = True
copy_indices = True
def __new__(cls, data=None, name=None,
dtype=None, shape=(), length=0,
description=None, unit=None, format=None, meta=None,
copy=False, copy_indices=True):
if data is None:
dtype = (np.dtype(dtype).str, shape)
self_data = np.zeros(length, dtype=dtype)
elif isinstance(data, BaseColumn) and hasattr(data, '_name'):
# When unpickling a MaskedColumn, ``data`` will be a bare
# BaseColumn with none of the expected attributes. In this case
# do NOT execute this block which initializes from ``data``
# attributes.
self_data = np.array(data.data, dtype=dtype, copy=copy)
if description is None:
description = data.description
if unit is None:
unit = unit or data.unit
if format is None:
format = data.format
if meta is None:
meta = deepcopy(data.meta)
if name is None:
name = data.name
elif isinstance(data, Quantity):
if unit is None:
self_data = np.array(data, dtype=dtype, copy=copy)
unit = data.unit
else:
self_data = np.array(data.to(unit), dtype=dtype, copy=copy)
if description is None:
description = data.info.description
if format is None:
format = data.info.format
if meta is None:
meta = deepcopy(data.info.meta)
else:
> self_data = np.array(data, dtype=dtype, copy=copy)
E OverflowError: Python int too large to convert to C long
c:\-\git\astropy\astropy\table\column.py:140: OverflowError
______________________ TestSDSSRemote.test_sdss_photoobj ______________________
self = <astroquery.sdss.tests.test_sdss_remote.TestSDSSRemote object at 0x000001F802596E10>
def test_sdss_photoobj(self):
colnames = ['ra', 'dec', 'objid', 'run', 'rerun', 'camcol', 'field']
dtypes = [float, float, int, int, int, int, int]
data = [
[2.01401566011947, 14.9014376776107, 1237653651835846751,
1904, 301, 3, 164],
[2.01643436080644, 14.8109761280994, 1237653651835846753,
1904, 301, 3, 164],
[2.03003450430003, 14.7653903655885, 1237653651835846845,
1904, 301, 3, 164],
[2.01347376262532, 14.8681488509887, 1237653651835846661,
1904, 301, 3, 164],
[2.18077144165426, 14.8482787058708, 1237653651835847302,
1904, 301, 3, 164]]
table = Table(data=[x for x in zip(*data)], names=colnames,
> dtype=dtypes)
astroquery\sdss\tests\test_sdss_remote.py:121:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
c:\-\git\astropy\astropy\table\table.py:371: in __init__
init_func(data, names, dtype, n_cols, copy)
c:\-\git\astropy\astropy\table\table.py:628: in _init_from_list
copy=copy, copy_indices=self._init_indices)
c:\-\git\astropy\astropy\table\column.py:706: in __new__
copy=copy, copy_indices=copy_indices)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'astropy.table.column.Column'>
data = (1237653651835846751, 1237653651835846753, 1237653651835846845, 1237653651835846661, 1237653651835847302)
name = 'objid', dtype = <class 'int'>, shape = (), length = 0
description = None, unit = None, format = None, meta = None, copy = True
copy_indices = True
def __new__(cls, data=None, name=None,
dtype=None, shape=(), length=0,
description=None, unit=None, format=None, meta=None,
copy=False, copy_indices=True):
if data is None:
dtype = (np.dtype(dtype).str, shape)
self_data = np.zeros(length, dtype=dtype)
elif isinstance(data, BaseColumn) and hasattr(data, '_name'):
# When unpickling a MaskedColumn, ``data`` will be a bare
# BaseColumn with none of the expected attributes. In this case
# do NOT execute this block which initializes from ``data``
# attributes.
self_data = np.array(data.data, dtype=dtype, copy=copy)
if description is None:
description = data.description
if unit is None:
unit = unit or data.unit
if format is None:
format = data.format
if meta is None:
meta = deepcopy(data.meta)
if name is None:
name = data.name
elif isinstance(data, Quantity):
if unit is None:
self_data = np.array(data, dtype=dtype, copy=copy)
unit = data.unit
else:
self_data = np.array(data.to(unit), dtype=dtype, copy=copy)
if description is None:
description = data.info.description
if format is None:
format = data.info.format
if meta is None:
meta = deepcopy(data.info.meta)
else:
> self_data = np.array(data, dtype=dtype, copy=copy)
E OverflowError: Python int too large to convert to C long
c:\-\git\astropy\astropy\table\column.py:140: OverflowError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment