Created
January 30, 2021 03:31
-
-
Save tomr-stargazer/e9763956ad57119f2df5ee708cb38799 to your computer and use it in GitHub Desktop.
Traceback: astropy tables / pandas / Endian error
This file contains 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
INPUT / OUTPUT for WSERV11: /Users/tsrice/Documents/Variability_Project_2020/wuvars/Data/reduction_artifacts/wserv11/WSERV11_graded_clipped0.95_scrubbed0.1_dusted0.5_new_error_corrected.h5 /Users/tsrice/Documents/Variability_Project_2020/wuvars/Data/analysis_artifacts/wserv11/WSERV11_graded_clipped0.95_scrubbed0.1_dusted0.5_new_error_corrected_summary_spreadsheet.h5 | |
Starting at: 2021-01-29 22:27:57.025274 | |
--------------------------------------------------------------------------- | |
ValueError Traceback (most recent call last) | |
<ipython-input-1-0b69d38cf0c5> in <module> | |
1 # let's run the create summary spreadsheets on the NEW data! | |
2 from wuvars.analysis.create_summary_spreadsheets import make_summary_spreadsheets_for_errorcorrected_data | |
----> 3 make_summary_spreadsheets_for_errorcorrected_data() | |
~/Documents/Variability_Project_2020/wuvars/analysis/create_summary_spreadsheets.py in make_summary_spreadsheets_for_errorcorrected_data() | |
147 print(f"Starting at: {startTime}") | |
148 | |
--> 149 write_summary_spreadsheet(input_path, output_path) | |
150 | |
151 print(f"WSERV{wserv} elapsed time: ", datetime.now() - startTime) | |
~/Documents/Variability_Project_2020/wuvars/analysis/create_summary_spreadsheets.py in write_summary_spreadsheet(filename, output) | |
21 df = dat.to_pandas() | |
22 | |
---> 23 ds = spreadsheet_maker(df) | |
24 ds.to_hdf(output, key="table") | |
25 | |
~/Documents/Variability_Project_2020/wuvars/analysis/variability_selection.py in spreadsheet_maker(df) | |
322 data_nuller(df) | |
323 | |
--> 324 df_spreadsheet = df.groupby("SOURCEID").apply(f_mi) | |
325 | |
326 return df_spreadsheet | |
~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/groupby.py in apply(self, func, *args, **kwargs) | |
892 with option_context("mode.chained_assignment", None): | |
893 try: | |
--> 894 result = self._python_apply_general(f, self._selected_obj) | |
895 except TypeError: | |
896 # gh-20949 | |
~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/groupby.py in _python_apply_general(self, f, data) | |
926 data after applying f | |
927 """ | |
--> 928 keys, values, mutated = self.grouper.apply(f, data, self.axis) | |
929 | |
930 return self._wrap_applied_output( | |
~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/ops.py in apply(self, f, data, axis) | |
187 result_values = None | |
188 | |
--> 189 sdata: FrameOrSeries = splitter._get_sorted_data() | |
190 if sdata.ndim == 2 and np.any(sdata.dtypes.apply(is_extension_array_dtype)): | |
191 # calling splitter.fast_apply will raise TypeError via apply_frame_axis0 | |
~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/groupby/ops.py in _get_sorted_data(self) | |
981 | |
982 def _get_sorted_data(self) -> FrameOrSeries: | |
--> 983 return self.data.take(self.sort_idx, axis=self.axis) | |
984 | |
985 def _chop(self, sdata, slice_obj: slice) -> NDFrame: | |
~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/generic.py in take(self, indices, axis, is_copy, **kwargs) | |
3584 | |
3585 new_data = self._mgr.take( | |
-> 3586 indices, axis=self._get_block_manager_axis(axis), verify=True | |
3587 ) | |
3588 return self._constructor(new_data).__finalize__(self, method="take") | |
~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/internals/managers.py in take(self, indexer, axis, verify, convert) | |
1473 new_labels = self.axes[axis].take(indexer) | |
1474 return self.reindex_indexer( | |
-> 1475 new_axis=new_labels, indexer=indexer, axis=axis, allow_dups=True | |
1476 ) | |
1477 | |
~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/internals/managers.py in reindex_indexer(self, new_axis, indexer, axis, fill_value, allow_dups, copy, consolidate, only_slice) | |
1317 ), | |
1318 ) | |
-> 1319 for blk in self.blocks | |
1320 ] | |
1321 | |
~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/internals/managers.py in <listcomp>(.0) | |
1317 ), | |
1318 ) | |
-> 1319 for blk in self.blocks | |
1320 ] | |
1321 | |
~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/internals/blocks.py in take_nd(self, indexer, axis, new_mgr_locs, fill_value) | |
1384 | |
1385 new_values = algos.take_nd( | |
-> 1386 values, indexer, axis=axis, allow_fill=allow_fill, fill_value=fill_value | |
1387 ) | |
1388 | |
~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/algorithms.py in take_nd(arr, indexer, axis, out, fill_value, allow_fill) | |
1757 arr.ndim, arr.dtype, out.dtype, axis=axis, mask_info=mask_info | |
1758 ) | |
-> 1759 func(arr, indexer, out, fill_value) | |
1760 | |
1761 if flip_order: | |
pandas/_libs/algos_take_helper.pxi in pandas._libs.algos.take_2d_axis1_float32_float32() | |
ValueError: Big-endian buffer not supported on little-endian compiler | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment