We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 699798e commit ead7af8Copy full SHA for ead7af8
1 file changed
rubin_sim/maf/utils/opsim_utils.py
@@ -107,10 +107,16 @@ def _local_get_sim_data(
107
108
if len(sim_data) == 0:
109
raise UserWarning("No data found matching sqlconstraint %s" % (sqlconstraint))
110
+
111
# Now add the stacker columns.
112
+ # This fails for pandas.DataFrames, so convert to recarray
113
+ # if necessary.
114
if stackers is not None:
115
+ if not isinstance(sim_data, np.recarray):
116
+ assert isinstance(sim_data, pd.DataFrame)
117
+ sim_data = sim_data.to_records(index=False)
118
for s in stackers:
- sim_data = s.run(sim_data)
119
+ sim_data = s.run(sim_data).view(np.recarray)
120
121
if return_class is np.recarray:
122
if isinstance(sim_data, pd.DataFrame):
0 commit comments