Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 23, 2024
1 parent 7c4f22b commit a1405fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qibojit/backends/clifford_operations_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,14 +701,14 @@ def cast(x, dtype=None, copy=False):
if dtype != x.dtype:
return x.astype(dtype)
return x

if sparse.issparse(x):
cls = getattr(cp.sparse, x.__class__.__name__)
return cls(x, dtype=dtype)

if isinstance(x, cp.ndarray) and copy:
return cp.copy(cp.asarray(x, dtype=dtype))

return cp.asarray(x, dtype=dtype)


Expand Down

0 comments on commit a1405fe

Please sign in to comment.