Skip to content

Commit

Permalink
docs: add comments with the reason of the error
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Muñoz committed Jan 9, 2025
1 parent b0c5ef3 commit 667ea6d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ot/bregman/_convolutional.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ def _convolutional_barycenter2d_log(
A = list_to_array(A)

nx = get_backend(A)
# This error is raised because we are using mutable assignment in the line
# `log_KU[k] = ...` which is not allowed in Jax and TF.
if nx.__name__ in ("jax", "tf"):
raise NotImplementedError(
"Log-domain functions are not yet implemented"
Expand Down Expand Up @@ -483,6 +485,8 @@ def _convolutional_barycenter2d_debiased_log(
A = list_to_array(A)
n_hists, width, height = A.shape
nx = get_backend(A)
# This error is raised because we are using mutable assignment in the line
# `log_KU[k] = ...` which is not allowed in Jax and TF.
if nx.__name__ in ("jax", "tf"):
raise NotImplementedError(
"Log-domain functions are not yet implemented"
Expand Down

0 comments on commit 667ea6d

Please sign in to comment.