We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c253856 commit 86a4db1Copy full SHA for 86a4db1
pandas/tests/util/test_shares_memory.py
@@ -30,3 +30,17 @@ def test_shares_memory_string():
30
31
obj = pd.array(["a", "b"], dtype=pd.ArrowDtype(pa.string()))
32
assert tm.shares_memory(obj, obj)
33
+
34
35
+def test_shares_memory_numpy():
36
+ arr = np.arange(10)
37
+ view = arr[:5]
38
+ assert tm.shares_memory(arr, view)
39
+ arr2 = np.arange(10)
40
+ assert not tm.shares_memory(arr, arr2)
41
42
43
+def test_shares_memory_rangeindex():
44
+ idx = pd.RangeIndex(10)
45
46
+ assert not tm.shares_memory(idx, arr)
0 commit comments