Skip to content

Commit

Permalink
update doc function
Browse files Browse the repository at this point in the history
  • Loading branch information
rflamary committed Oct 30, 2023
1 parent 7cf5651 commit de19529
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion ot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,23 @@ def reduce_lazytensor(a, func, axis=None, nx=None, batch_size=100):


def get_lowrank_lazytensor(Q, R, d=None, nx=None):
""" Get a lowrank LazyTensor T=Q@R^T or T=Q@diag(d)@R^T"""
""" Get a low rank LazyTensor T=Q@R^T or T=Q@diag(d)@R^T
Parameters
----------
Q : ndarray, shape (n, r)
First factor of the lowrank tensor
R : ndarray, shape (m, r)
Second factor of the lowrank tensor
d : ndarray, shape (r,), optional
Diagonal of the lowrank tensor
nx : Backend, optional
Backend to use for the reduction
Returns
-------
T : LazyTensor
Lowrank tensor T=Q@R^T or T=Q@diag(d)@R^T """

if nx is None:
nx = get_backend(Q, R, d)
Expand Down

0 comments on commit de19529

Please sign in to comment.