Skip to content

Commit

Permalink
Add docstring lost inold merge
Browse files Browse the repository at this point in the history
  • Loading branch information
unalmis committed Jan 5, 2025
1 parent 3e51e5c commit eb8b50c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions desc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,10 @@ def atleast_2d_end(ary):


def dot(a, b, axis=-1):
"""Batched vector dot product.
"""Batched coordinate dot product.
This returns the dot product between elements of a vector space only
if the basis vectors associated with these coordinates are orthonormal.
Parameters
----------
Expand All @@ -776,11 +779,15 @@ def dot(a, b, axis=-1):
y = sum(a*b, axis=axis)
"""
return jnp.sum(a * b, axis=axis, keepdims=False)
return jnp.sum(a * b, axis=axis)


def cross(a, b, axis=-1):
"""Batched vector cross product.
"""Batched coordinate cross product.
This returns the cross product between elements of a vector space only
if the basis vectors associated with these coordinates are orthonormal
and right-handed.
Parameters
----------
Expand Down

0 comments on commit eb8b50c

Please sign in to comment.