Created
November 3, 2018 16:59
-
-
Save mwcraig/8655b3eeec3afbecffda402b2b238408 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"3.2.dev23227\n" | |
] | |
} | |
], | |
"source": [ | |
"from astropy import __version__\n", | |
"print(__version__)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"ename": "AttributeError", | |
"evalue": "'Time' object has no attribute 'dtype'", | |
"output_type": "error", | |
"traceback": [ | |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | |
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", | |
"\u001b[0;32m<ipython-input-2-b7e4a4daf34e>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 6\u001b[0m location=EarthLocation(-2446354, 4237210, 4077985, unit='m'))\n\u001b[1;32m 7\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshow_in_notebook\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", | |
"\u001b[0;32m~/Development/astronomy/astropy-org/astropy-bug-fixes/astropy/table/table.py\u001b[0m in \u001b[0;36mshow_in_notebook\u001b[0;34m(self, tableid, css, display_length, table_class, show_row_index)\u001b[0m\n\u001b[1;32m 1026\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1027\u001b[0m \u001b[0mcolumns\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdisplay_table\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1028\u001b[0;31m sortable_columns = [i for i, col in enumerate(columns)\n\u001b[0m\u001b[1;32m 1029\u001b[0m if col.dtype.kind in 'iufc']\n\u001b[1;32m 1030\u001b[0m \u001b[0mhtml\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0mjsv\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mipynb\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtableid\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcss\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcss\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msort_columns\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msortable_columns\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
"\u001b[0;32m~/Development/astronomy/astropy-org/astropy-bug-fixes/astropy/table/table.py\u001b[0m in \u001b[0;36m<listcomp>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 1027\u001b[0m \u001b[0mcolumns\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdisplay_table\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1028\u001b[0m sortable_columns = [i for i, col in enumerate(columns)\n\u001b[0;32m-> 1029\u001b[0;31m if col.dtype.kind in 'iufc']\n\u001b[0m\u001b[1;32m 1030\u001b[0m \u001b[0mhtml\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0mjsv\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mipynb\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtableid\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcss\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcss\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msort_columns\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msortable_columns\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1031\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mHTML\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhtml\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
"\u001b[0;32m~/Development/astronomy/astropy-org/astropy-bug-fixes/astropy/time/core.py\u001b[0m in \u001b[0;36m__getattr__\u001b[0;34m(self, attr)\u001b[0m\n\u001b[1;32m 1554\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1555\u001b[0m \u001b[0;31m# Should raise AttributeError\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1556\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__getattribute__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mattr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1557\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1558\u001b[0m \u001b[0;34m@\u001b[0m\u001b[0moverride__dir__\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
"\u001b[0;31mAttributeError\u001b[0m: 'Time' object has no attribute 'dtype'" | |
] | |
} | |
], | |
"source": [ | |
"from astropy.time import Time\n", | |
"from astropy.table import Table\n", | |
"from astropy.coordinates import EarthLocation\n", | |
"t = Table()\n", | |
"t['a'] = Time([100.0, 200.0], scale='tt', format='mjd',\n", | |
" location=EarthLocation(-2446354, 4237210, 4077985, unit='m'))\n", | |
"\n", | |
"t.show_in_notebook()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment