Skip to content

Commit 8a30c21

Browse files
committed
small fixes
1 parent eb0acb6 commit 8a30c21

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/qibo/backends/abstract.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def add_at(
315315
indices (ArrayLike): Indices at which to add elements.
316316
array_2 (ArrayLike): Input array with elements to add.
317317
"""
318-
return self.engine.add.at(array_1, indices, array_2)
318+
self.engine.add.at(array_1, indices, array_2)
319319

320320
def all(self, array: ArrayLike, **kwargs) -> Union[bool, ArrayLike]:
321321
"""Test whether all ``array`` elements evaluate to ``True``.
@@ -1012,6 +1012,8 @@ def logm(self, array: ArrayLike, **kwargs) -> ArrayLike: # pragma: no cover
10121012
10131013
Args:
10141014
array (ArrayLike): input array.
1015+
kwargs (optional): additional options for this function.
1016+
For more details, see the corresponding engine's documentation.
10151017
10161018
Returns:
10171019
ArrayLike: The resulting matrix logarithm.

src/qibo/backends/numpy.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,18 @@ def block_diag(self, *arrays: ArrayLike) -> ArrayLike:
122122
return block_diag(*arrays)
123123

124124
def coo_matrix(self, array: ArrayLike, **kwargs) -> ArrayLike: # pragma: no cover
125+
"""Return the sparse version of ``array`` in coordinate format.
126+
127+
Also known as the ``ijv`` or ``triplet`` format.
128+
129+
Args:
130+
array (ArrayLike): input array.
131+
kwargs (optional): additional options for this function.
132+
For more details, see the corresponding engine's documentation.
133+
134+
Returns:
135+
ArrayLike: The coordinate-format version of ``array``.
136+
"""
125137
return coo_matrix(array, **kwargs)
126138

127139
def csr_matrix(self, array: ArrayLike, **kwargs) -> ArrayLike:

0 commit comments

Comments
 (0)