{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":84795,"databundleVersionId":10934030,"sourceType":"competition"}],"dockerImageVersionId":30886,"isInternetEnabled":false,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import zipfile\nkonwinski= zipfile.ZipFile('../input/konwinski-prize/data.a_zip')\nkonwinski.extractall()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-02-16T07:20:40.700408Z","iopub.execute_input":"2025-02-16T07:20:40.700795Z","iopub.status.idle":"2025-02-16T07:20:47.072305Z","shell.execute_reply.started":"2025-02-16T07:20:40.700764Z","shell.execute_reply":"2025-02-16T07:20:47.070393Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"pip_packages_path='/kaggle/working/data/pip_packages/astropy__astropy-16898'","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-02-16T07:39:06.744949Z","iopub.execute_input":"2025-02-16T07:39:06.745381Z","iopub.status.idle":"2025-02-16T07:39:06.750935Z","shell.execute_reply.started":"2025-02-16T07:39:06.745346Z","shell.execute_reply":"2025-02-16T07:39:06.749599Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"%cd /kaggle/working/data/repos/repo__astropy__astropy-16898","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-02-16T07:23:19.101648Z","iopub.execute_input":"2025-02-16T07:23:19.102083Z","iopub.status.idle":"2025-02-16T07:23:19.111419Z","shell.execute_reply.started":"2025-02-16T07:23:19.102051Z","shell.execute_reply":"2025-02-16T07:23:19.110362Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!dpkg -i /kaggle/input/konwinski-prize/kprize_setup/python3.11/ubuntu_22.04/*.deb","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-02-16T07:31:54.011782Z","iopub.execute_input":"2025-02-16T07:31:54.012254Z","iopub.status.idle":"2025-02-16T07:32:02.105875Z","shell.execute_reply.started":"2025-02-16T07:31:54.012211Z","shell.execute_reply":"2025-02-16T07:32:02.104375Z"},"collapsed":true,"jupyter":{"outputs_hidden":true}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!uv venv --python python3.11\n!source .venv/bin/activate\n!SETUPTOOLS_SCM_PRETEND_VERSION=1.2.3 uv pip install --no-index --find-links=$pip_packages_path --link-mode=symlink -e .[test] --verbose && SETUPTOOLS_SCM_PRETEND_VERSION=1.2.3 uv pip install --no-index --find-links=$pip_packages_path --link-mode=symlink attrs==23.1.0 exceptiongroup==1.1.3 execnet==2.0.2 hypothesis==6.82.6 iniconfig==2.0.0 numpy==1.25.2 packaging==23.1 pluggy==1.3.0 psutil==5.9.5 pyerfa==2.0.0.3 pytest-arraydiff==0.5.0 pytest-astropy-header==0.2.2 pytest-astropy==0.10.0 pytest-cov==4.1.0 pytest-doctestplus==1.0.0 pytest-filter-subpackage==0.1.2 pytest-mock==3.11.1 pytest-openfiles==0.5.0 pytest-remotedata==0.4.0 pytest-xdist==3.3.1 pytest==7.4.0 PyYAML==6.0.1 setuptools==68.0.0 sortedcontainers==2.4.0 tomli==2.0.1","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2025-02-16T07:39:13.761779Z","iopub.execute_input":"2025-02-16T07:39:13.762117Z","iopub.status.idle":"2025-02-16T07:40:45.799013Z","shell.execute_reply.started":"2025-02-16T07:39:13.762091Z","shell.execute_reply":"2025-02-16T07:40:45.797739Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"%pwd","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-02-16T07:53:58.431643Z","iopub.execute_input":"2025-02-16T07:53:58.432147Z","iopub.status.idle":"2025-02-16T07:53:58.439626Z","shell.execute_reply.started":"2025-02-16T07:53:58.43211Z","shell.execute_reply":"2025-02-16T07:53:58.438567Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!pip uninstall -y astropy\n!pip show astropy","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-02-16T07:56:35.790763Z","iopub.execute_input":"2025-02-16T07:56:35.791166Z","iopub.status.idle":"2025-02-16T07:56:39.32279Z","shell.execute_reply.started":"2025-02-16T07:56:35.791131Z","shell.execute_reply":"2025-02-16T07:56:39.321553Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"%%file test.py\nimport numpy as np\nimport astropy\n\nfrom astropy.io import fits\nfrom astropy.table import QTable, Table\n\nprint('numpy', np.__version__)\nprint('astropy',astropy.__version__)\ndata = np.array([(\"\", 12)], dtype=[(\"a\", \"S\"), (\"b\", \"i4\")])\nfits.BinTableHDU(data).writeto(\"zerodtable.fits\", overwrite=True)\nt = Table.read(\"zerodtable.fits\")\nprint(t)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-02-16T07:57:24.738836Z","iopub.execute_input":"2025-02-16T07:57:24.739127Z","iopub.status.idle":"2025-02-16T07:57:24.747013Z","shell.execute_reply.started":"2025-02-16T07:57:24.739103Z","shell.execute_reply":"2025-02-16T07:57:24.7459Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!uv run pip show astropy","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-02-16T07:56:40.693894Z","iopub.execute_input":"2025-02-16T07:56:40.694273Z","iopub.status.idle":"2025-02-16T07:57:24.737381Z","shell.execute_reply.started":"2025-02-16T07:56:40.69424Z","shell.execute_reply":"2025-02-16T07:57:24.73621Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!uv run python test.py","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-02-16T07:57:26.797345Z","iopub.execute_input":"2025-02-16T07:57:26.797737Z","iopub.status.idle":"2025-02-16T07:58:50.311214Z","shell.execute_reply.started":"2025-02-16T07:57:26.797696Z","shell.execute_reply":"2025-02-16T07:58:50.309722Z"}},"outputs":[],"execution_count":null}]}