Skip to content

Commit f95b93b

Browse files
committed
🤖 prefer Shape over Rank for unknown-sized array types
1 parent 103545a commit f95b93b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎src/numpy-stubs/@test/generated/ndarray_add.pyi

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tool/testgen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def _array_expr_single(
234234
dtype_expr = f"{NP}.dtype[{sctype_expr}]"
235235

236236
if ndim is None:
237-
shape_expr = "_nt.Rank"
237+
shape_expr = "_nt.Shape"
238238
else:
239239
shape_expr_args = ", ".join(["int"] * ndim) if ndim else "()"
240240
shape_expr = f"tuple[{shape_expr_args}]"

0 commit comments

Comments
 (0)