Skip to content

Commit

Permalink
Merge pull request #124 from MICA-MNI/120-code-inconsistencyerror-in-…
Browse files Browse the repository at this point in the history
…tutorial-2

120 code inconsistencyerror in tutorial 2
  • Loading branch information
zihuaihuai authored Oct 2, 2024
2 parents 95aa50c + 30d1288 commit e308ffc
Show file tree
Hide file tree
Showing 5 changed files with 239 additions and 28 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
docs/_build
docs/generated
test_python
bugs

.pytest_cache
.ipynb_checkpoints
Expand Down
2 changes: 1 addition & 1 deletion brainspace/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""BrainSpace version"""

__version__ = '0.1.10'
__version__ = '0.1.50'
1 change: 1 addition & 0 deletions brainspace/gradient/kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def _build_kernel(x, kernel, gamma=None):
if kernel in {'cosine', 'normalized_angle'}:
x = cosine_similarity(x)
if kernel == 'normalized_angle':
x = np.clip(x, -1.0, 1.0)
x = 1 - np.arccos(x, x)/np.pi
return x

Expand Down
Loading

0 comments on commit e308ffc

Please sign in to comment.