Skip to content

Commit

Permalink
update paddle code
Browse files Browse the repository at this point in the history
  • Loading branch information
HydrogenSulfate committed Dec 3, 2024
1 parent ec46178 commit dfd4485
Show file tree
Hide file tree
Showing 5 changed files with 349 additions and 144 deletions.
12 changes: 3 additions & 9 deletions array_api_compat/paddle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,10 @@
import paddle

for n in dir(paddle):
if (
n.startswith("_")
or n.endswith("_")
or "gpu" in n
or "cpu" in n
or "backward" in n
):
if n.startswith("_") or n.endswith("_") or "gpu" in n or "cpu" in n or "backward" in n:
continue
exec(n + " = paddle." + n)
exec("asarray = paddle.to_tensor")
exec(f"{n} = paddle.{n}")


# These imports may overwrite names from the import * above.
from ._aliases import * # noqa: F403
Expand Down
Loading

0 comments on commit dfd4485

Please sign in to comment.