Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
leofang committed Feb 13, 2024
1 parent e3535ce commit 65ca5bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/array_api_stubs/_draft/creation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,12 @@ def from_dlpack(
def func(x, y):
xp_x = x.__array_namespace__()
xp_y = y.__array_namespace__()
# Other functions than `from_dlpack` only work if both arrays are from the same library. So if
# `y` is from a different one than `x`, let's convert `y` into an array of the same type as `x`:
if not xp_x == xp_y:
y = xp_x.from_dlpack(y, copy=True, device=x.device)
# From now on use `xp_x.xxxxx` functions, as both arrays are from the library `xp_x`
...
Expand Down

0 comments on commit 65ca5bd

Please sign in to comment.