Skip to content

Commit

Permalink
Explicitly set xarray coordinates.
Browse files Browse the repository at this point in the history
  • Loading branch information
morriscb committed Oct 25, 2023
1 parent ecae373 commit 3df4687
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,12 @@ def _response_by_stimulus_position(
dataset[spike_count_key] = dataset.sum(dim=time_key)
dataset = dataset.drop(time_key)

dataset[row_key] = presentations.loc[:, row_key]
dataset[column_key] = presentations.loc[:, column_key]
dataset = dataset.assign_coords(
{row_key: ("stimulus_presentation_id",
presentations.loc[:, row_key].to_numpy())})
dataset = dataset.assign_coords(
{column_key: ("stimulus_presentation_id",
presentations.loc[:, column_key].to_numpy())})
dataset = dataset.to_dataframe()

dataset = (
Expand Down

0 comments on commit 3df4687

Please sign in to comment.