8000 ignore `numpy` test shape · narwhals-dev/narwhals@65e7ff0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 65e7ff0

Browse files
committed
ignore numpy test shape
Shape typing is an ongoing issue numpy/numpy#28076
1 parent b3d8d53 commit 65e7ff0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/frame/with_columns_sequence_test.py

Lines changed: 1 addition & 1 deletion
< 8000 /tr>
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
def test_with_columns(constructor_eager: ConstructorEager) -> None:
1616
result = (
1717
nw.from_native(constructor_eager(data))
18-
.with_columns(d=np.array([4, 5]))
18+
.with_columns(d=np.array([4, 5])) # pyright: ignore[reportArgumentType]
1919
.with_columns(e=nw.col("d") + 1)
2020
.select("d", "e")
2121
)

tests/from_numpy_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_from_numpy(constructor: Constructor, request: pytest.FixtureRequest) ->
2323
request.applymarker(pytest.mark.xfail)
2424
df = nw.from_native(constructor(data))
2525
native_namespace = nw.get_native_namespace(df)
26-
result = nw.from_numpy(arr, native_namespace=native_namespace)
26+
result = nw.from_numpy(arr, native_namespace=native_namespace) # pyright: ignore[reportArgumentType]
2727
assert_equal_data(result, expected)
2828
assert isinstance(result, nw.DataFrame)
2929

@@ -42,7 +42,7 @@ def test_from_numpy_schema_dict(
4242
df = nw_v1.from_native(constructor(data))
4343
native_namespace = nw_v1.get_native_namespace(df)
4444
result = nw_v1.from_numpy(
45-
arr,
45+
arr, # pyright: ignore[reportArgumentType]
4646
native_namespace=native_namespace,
4747
schema=schema, # type: ignore[arg-type]
4848
)
@@ -58,7 +58,7 @@ def test_from_numpy_schema_list(
5858
df = nw_v1.from_native(constructor(data))
5959
native_namespace = nw_v1.get_native_namespace(df)
6060
result = nw_v1.from_numpy(
61-
arr,
61+
arr, # pyright: ignore[reportArgumentType]
6262
native_namespace=native_namespace,
6363
schema=schema,
6464
)
@@ -83,7 +83,7 @@ def test_from_numpy_v1(constructor: Constructor, request: pytest.FixtureRequest)
8383
request.applymarker(pytest.mark.xfail)
8484
df = nw_v1.from_native(constructor(data))
8585
native_namespace = nw_v1.get_native_namespace(df)
86-
result = nw_v1.from_numpy(arr, native_namespace=native_namespace)
86+
result = nw_v1.from_numpy(arr, native_namespace=native_namespace) # pyright: ignore[reportArgumentType]
8787
assert_equal_data(result, expected)
8888
assert isinstance(result, nw_v1.DataFrame)
8989

@@ -92,4 +92,4 @@ def test_from_numpy_not2d(constructor: Constructor) -> None:
9292
df = nw.from_native(constructor(data))
9393
native_namespace = nw_v1.get_native_namespace(df)
9494
with pytest.raises(ValueError, match="`from_numpy` only accepts 2D numpy arrays"):
95-
nw.from_numpy(np.array([0]), native_namespace=native_namespace)
95+
nw.from_numpy(np.array([0]), native_namespace=native_namespace) # pyright: ignore[reportArgumentType]

0 commit comments

Comments
 (0)
0