Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 84a1c0d

Browse filesBrowse files
committed
MNT: Fix test failures from string representations
1 parent 9c34260 commit 84a1c0d
Copy full SHA for 84a1c0d

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎lib/matplotlib/tests/test_preprocess_data.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_preprocess_data.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import re
44

5+
import numpy as np
56
import pytest
67

78
from matplotlib import _preprocess_data
@@ -165,7 +166,9 @@ def test_function_call_with_pandas_data(func):
165166
"""test with pandas dataframe -> label comes from data["col"].name """
166167
pd = pytest.importorskip('pandas')
167168

168-
data = pd.DataFrame({"a": [1, 2], "b": [8, 9], "w": ["NOT", "NOT"]})
169+
data = pd.DataFrame({"a": np.array([1, 2], dtype=np.int32),
170+
"b": np.array([8, 9], dtype=np.int32),
171+
"w": ["NOT", "NOT"]})
169172

170173
assert (func(None, "a", "b", data=data) ==
171174
"x: [1, 2], y: [8, 9], ls: x, w: xyz, label: b")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.