Skip to content

Commit

Permalink
Merge pull request #123 from justinehansen/compare-images
Browse files Browse the repository at this point in the history
[FIX] stats.compare_images compatible with more metrics
  • Loading branch information
VinceBaz authored Nov 24, 2023
2 parents 3b09f90 + 3df7945 commit e1f4fcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neuromaps/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def compare_images(src, trg, metric='pearsonr', ignore_zero=True, nulls=None,
if not callable(metric):
raise ValueError(f'Invalid `metric`: {metric}')
else:
if not isinstance(metric([1, 1], [1, 1]), float):
if not np.isscalar(metric([1, 1], [1, 1])):
raise ValueError('Provided callable `metric` must accept two '
'inputs and return single value.')

Expand Down

0 comments on commit e1f4fcb

Please sign in to comment.