Skip to content
Snippets Groups Projects
Commit 43f00848 authored by Jakob Roth's avatar Jakob Roth
Browse files

vector_math: deprecate dot method

parent 71e864b0
No related branches found
No related tags found
1 merge request!1006optimze: replace .dot with vdot
Pipeline #241403 passed
...@@ -15,6 +15,8 @@ from jax.tree_util import ( ...@@ -15,6 +15,8 @@ from jax.tree_util import (
tree_structure, tree_structure,
) )
from ..misc import deprecated
class ShapeWithDtype: class ShapeWithDtype:
"""Minimal helper class storing the shape and dtype of an object. """Minimal helper class storing the shape and dtype of an object.
...@@ -186,9 +188,15 @@ def norm(tree, ord=2): ...@@ -186,9 +188,15 @@ def norm(tree, ord=2):
return norm(jnp.array(tree_leaves(tree_map(el_norm, tree))), ord=ord) return norm(jnp.array(tree_leaves(tree_map(el_norm, tree))), ord=ord)
@deprecated("`nifty.re.dot` is deprecated. Consider using `nifty.re.vdot`.")
def dot(a, b, *, precision=None): def dot(a, b, *, precision=None):
"""Returns the dot product of the two vectors. """Returns the dot product of the two vectors.
Notes
-----
This method is deprecated, please use the `vdot` method and be careful with
complex conjugation.
Parameters Parameters
---------- ----------
a : object a : object
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment