pyrefly-numpy-stubs 1.5.0__tar.gz → 1.6.0.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyrefly_numpy_stubs-1.5.0 → pyrefly_numpy_stubs-1.6.0.dev1}/PKG-INFO +2 -2
- {pyrefly_numpy_stubs-1.5.0 → pyrefly_numpy_stubs-1.6.0.dev1}/numpy-stubs/_shapes.pyi +9 -9
- {pyrefly_numpy_stubs-1.5.0 → pyrefly_numpy_stubs-1.6.0.dev1}/pyproject.toml +2 -2
- {pyrefly_numpy_stubs-1.5.0 → pyrefly_numpy_stubs-1.6.0.dev1}/LICENSE +0 -0
- {pyrefly_numpy_stubs-1.5.0 → pyrefly_numpy_stubs-1.6.0.dev1}/README.md +0 -0
- {pyrefly_numpy_stubs-1.5.0 → pyrefly_numpy_stubs-1.6.0.dev1}/numpy-stubs/__init__.pyi +0 -0
- {pyrefly_numpy_stubs-1.5.0 → pyrefly_numpy_stubs-1.6.0.dev1}/numpy-stubs/linalg/__init__.pyi +0 -0
- {pyrefly_numpy_stubs-1.5.0 → pyrefly_numpy_stubs-1.6.0.dev1}/numpy-stubs/py.typed +0 -0
- {pyrefly_numpy_stubs-1.5.0 → pyrefly_numpy_stubs-1.6.0.dev1}/numpy-stubs/random/__init__.pyi +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pyrefly-numpy-stubs
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0.dev1
|
|
4
4
|
Summary: NumPy type stubs with array-shape tracking, maintained by Pyrefly
|
|
5
5
|
Project-URL: homepage, https://pyrefly.org
|
|
6
6
|
Project-URL: documentation, https://pyrefly.org/en/docs/
|
|
@@ -34,7 +34,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
34
34
|
Classifier: Typing :: Stubs Only
|
|
35
35
|
Requires-Python: >=3.12
|
|
36
36
|
Requires-Dist: numpy
|
|
37
|
-
Requires-Dist: pyrefly-shape-extensions==1.
|
|
37
|
+
Requires-Dist: pyrefly-shape-extensions==1.6.0.dev1
|
|
38
38
|
Description-Content-Type: text/markdown
|
|
39
39
|
|
|
40
40
|
# pyrefly-numpy-stubs
|
|
@@ -43,7 +43,7 @@ def repeat_shape(shape: IntTuple, repeats: Int, axis: int | None) -> IntTuple:
|
|
|
43
43
|
if axis < 0:
|
|
44
44
|
normalized_axis = axis + rank
|
|
45
45
|
else:
|
|
46
|
-
normalized_axis = axis
|
|
46
|
+
normalized_axis = axis
|
|
47
47
|
return dsl.IntTuple(
|
|
48
48
|
(
|
|
49
49
|
shape[index] * repeats if index == normalized_axis else shape[index]
|
|
@@ -72,7 +72,7 @@ def repeat_sequence_shape(
|
|
|
72
72
|
if axis < 0:
|
|
73
73
|
normalized_axis = axis + rank
|
|
74
74
|
else:
|
|
75
|
-
normalized_axis = axis
|
|
75
|
+
normalized_axis = axis
|
|
76
76
|
else:
|
|
77
77
|
return dsl.Invalid("axis must be an integer or None")
|
|
78
78
|
extent = source[normalized_axis]
|
|
@@ -106,7 +106,7 @@ def take_shape(shape: IntTuple, indices: IntTuple, axis: int | None) -> IntTuple
|
|
|
106
106
|
if axis < 0:
|
|
107
107
|
normalized_axis = axis + rank
|
|
108
108
|
else:
|
|
109
|
-
normalized_axis = axis
|
|
109
|
+
normalized_axis = axis
|
|
110
110
|
return dsl.concat(
|
|
111
111
|
dsl.concat(shape[:normalized_axis], indices),
|
|
112
112
|
shape[normalized_axis + 1 :],
|
|
@@ -139,11 +139,11 @@ def diagonal_shape(
|
|
|
139
139
|
if axis1 < 0:
|
|
140
140
|
first = axis1 + len(shape)
|
|
141
141
|
else:
|
|
142
|
-
first = axis1
|
|
142
|
+
first = axis1
|
|
143
143
|
if axis2 < 0:
|
|
144
144
|
second = axis2 + len(shape)
|
|
145
145
|
else:
|
|
146
|
-
second = axis2
|
|
146
|
+
second = axis2
|
|
147
147
|
if first == second:
|
|
148
148
|
return dsl.Invalid("diagonal axes must be distinct")
|
|
149
149
|
outer = dsl.IntTuple(
|
|
@@ -266,7 +266,7 @@ def stack_shape(shapes: IntTuples, axis: int) -> IntTuple:
|
|
|
266
266
|
if axis < 0:
|
|
267
267
|
norm_axis = axis + output_rank
|
|
268
268
|
else:
|
|
269
|
-
norm_axis = axis
|
|
269
|
+
norm_axis = axis
|
|
270
270
|
rank_mismatches = dsl.IntTuple(
|
|
271
271
|
(0 if len(shape) == len(first) else 1 for shape in shapes)
|
|
272
272
|
)
|
|
@@ -300,7 +300,7 @@ def expand_dims_shape(shape: IntTuple, axis: int) -> IntTuple:
|
|
|
300
300
|
if axis < 0:
|
|
301
301
|
norm_axis = axis + output_rank
|
|
302
302
|
else:
|
|
303
|
-
norm_axis = axis
|
|
303
|
+
norm_axis = axis
|
|
304
304
|
return dsl.IntTuple(
|
|
305
305
|
(
|
|
306
306
|
1
|
|
@@ -318,11 +318,11 @@ def swapaxes_shape(shape: IntTuple, axis1: int, axis2: int) -> IntTuple:
|
|
|
318
318
|
if axis1 < 0:
|
|
319
319
|
first = axis1 + rank
|
|
320
320
|
else:
|
|
321
|
-
first = axis1
|
|
321
|
+
first = axis1
|
|
322
322
|
if axis2 < 0:
|
|
323
323
|
second = axis2 + rank
|
|
324
324
|
else:
|
|
325
|
-
second = axis2
|
|
325
|
+
second = axis2
|
|
326
326
|
return dsl.IntTuple(
|
|
327
327
|
(
|
|
328
328
|
shape[second]
|
|
@@ -8,7 +8,7 @@ description = "NumPy type stubs with array-shape tracking, maintained by Pyrefly
|
|
|
8
8
|
readme = "README.md"
|
|
9
9
|
requires-python = ">=3.12"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
11
|
-
version = "1.
|
|
11
|
+
version = "1.6.0.dev1"
|
|
12
12
|
keywords = ["typechecker", "typechecking", "stubs", "numpy"]
|
|
13
13
|
classifiers = [
|
|
14
14
|
"Development Status :: 4 - Beta",
|
|
@@ -18,7 +18,7 @@ classifiers = [
|
|
|
18
18
|
"Typing :: Stubs Only",
|
|
19
19
|
]
|
|
20
20
|
dependencies = [
|
|
21
|
-
"pyrefly-shape-extensions==1.
|
|
21
|
+
"pyrefly-shape-extensions==1.6.0.dev1",
|
|
22
22
|
"numpy",
|
|
23
23
|
]
|
|
24
24
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyrefly_numpy_stubs-1.5.0 → pyrefly_numpy_stubs-1.6.0.dev1}/numpy-stubs/linalg/__init__.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{pyrefly_numpy_stubs-1.5.0 → pyrefly_numpy_stubs-1.6.0.dev1}/numpy-stubs/random/__init__.pyi
RENAMED
|
File without changes
|