Skip to content

Commit ec9da52

Browse files
committed
Tweak a helper function to always return a 1-D array.
1 parent 15ac3bd commit ec9da52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/openpois/models/model_fitter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _to_table(self, x):
166166
"""
167167
Helper function to convert a tensor to a numpy array.
168168
"""
169-
return x.data.cpu().numpy()
169+
return x.data.cpu().numpy().reshape(-1)
170170

171171
def get_parameter_table(
172172
self,

0 commit comments

Comments
 (0)