Skip to content

Commit

Permalink
round and ch_values from_spot_data of IntensityTable expected Sequenc…
Browse files Browse the repository at this point in the history
…e but got ndarray instead: replaced np.arange with range
  • Loading branch information
shachafl committed Mar 21, 2024
1 parent 91db80d commit b115d8e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions starfish/core/codebook/test/test_metric_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def intensity_table_factory(data: np.ndarray=np.array([[[0, 3], [4, 0]]])) -> In
intensity_table = IntensityTable.from_spot_data(
data,
SpotAttributes(spot_attributes_data),
ch_values=np.arange(data.shape[1]),
round_values=np.arange(data.shape[2]),
ch_values = range(data.shape[1]),
round_values = range(data.shape[2]),
)
return intensity_table

Expand Down
4 changes: 2 additions & 2 deletions starfish/core/codebook/test/test_normalize_code_traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def intensity_table_factory() -> IntensityTable:

intensity_table = IntensityTable.from_spot_data(
intensities, spot_attributes,
ch_values=np.arange(intensities.shape[1]),
round_values=np.arange(intensities.shape[2]),
ch_values = range(intensities.shape[1]),
round_values = range(intensities.shape[2]),
)
return intensity_table

Expand Down
4 changes: 2 additions & 2 deletions starfish/core/codebook/test/test_per_round_max_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def intensity_table_factory(data: np.ndarray = np.array([[[0, 3], [4, 0]]])) ->
spot_attributes = SpotAttributes(spot_attributes_data)
intensity_table = IntensityTable.from_spot_data(
data, spot_attributes,
round_values=np.arange(data.shape[1]),
ch_values=np.arange(data.shape[2]),
round_values = range(data.shape[1]),
ch_values = range(data.shape[2]),
)
return intensity_table

Expand Down
2 changes: 1 addition & 1 deletion starfish/core/intensity_table/intensity_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def synthetic_intensities(
assert 0 < data.max() <= 1

intensities = cls.from_spot_data(
data, spot_attributes, np.arange(data.shape[1]), np.arange(data.shape[2]))
data, spot_attributes, range(data.shape[1]), range(data.shape[2]))
return intensities

@classmethod
Expand Down

0 comments on commit b115d8e

Please sign in to comment.