Skip to content

Commit

Permalink
_callable.py: clean up variable/class names
Browse files Browse the repository at this point in the history
Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
  • Loading branch information
nkoep committed Jan 26, 2020
1 parent a68a46a commit 83f63f1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pymanopt/autodiff/backends/_callable.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .. import make_tracing_backend_decorator


class CallableBackend(Backend):
class _CallableBackend(Backend):
def __str__(self):
return "callable"

Expand All @@ -18,12 +18,11 @@ def is_compatible(self, objective, argument):
def compile_function(self, objective, argument):
return objective

@assert_backend_available
def __not_implemented(self, objective, argument):
def _raise_not_implemented_error(self, objective, argument):
raise NotImplementedError("No autodiff support available for the "
"canonical callable backend")
"canonical 'Callable' backend")

compute_gradient = compute_hessian = __not_implemented
compute_gradient = compute_hessian = _raise_not_implemented_error


Callable = make_tracing_backend_decorator(CallableBackend)
Callable = make_tracing_backend_decorator(_CallableBackend)

0 comments on commit 83f63f1

Please sign in to comment.