8000 Add support for tiling an array to the specification by kgryte · Pull Request #692 · data-apis/array-api · GitHub
[go: up one dir, main page]

Skip to content

Add support for tiling an array to the specification #692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix missing space
  • Loading branch information
kgryte committed Sep 21, 2023
commit b74d30f54dd9a6d3e9f21b4fc0264b9e75b1974c
2 changes: 1 addition & 1 deletion src/array_api_stubs/_draft/manipulation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def tile(x: array, repetitions: Tuple[int, ...], /):

Let ``N = len(x.shape)`` and ``M = len(repetitions)``.

If ``N > M``, the function must prepend ones until all axes (dimensions) are specified (e.g., if ``x`` has shape ``(8,6,4,2)`` and ``repetitions``is the tuple ``(3,3)``, then ``repetitions`` must be treated as ``(1,1,3,3)``).
If ``N > M``, the function must prepend ones until all axes (dimensions) are specified (e.g., if ``x`` has shape ``(8,6,4,2)`` and ``repetitions`` is the tuple ``(3,3)``, then ``repetitions`` must be treated as ``(1,1,3,3)``).

If ``N < M``, the function must prepend singleton axes (dimensions) to ``x`` until ``x`` has as many axes (dimensions) as ``repetitions`` specifies (e.g., if ``x`` has shape ``(4,2)`` and ``repetitions`` is the tuple ``(3,3,3,3)``, then ``x`` must be treated as if it has shape ``(1,1,4,2)``).

Expand Down
0