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 88903b9 commit 0debafaCopy full SHA for 0debafa
pandas/tests/reshape/test_tile.py
@@ -514,14 +514,20 @@ def f():
514
515
def test_cut_read_only(self):
516
# issue 18773
517
- readonly = np.arange(0, 100, 10)
518
- readonly.flags.writeable = False
+ def _test_memview_cut(array_1_writeable, array_2_writeable):
+ array_1 = np.arange(0, 100, 10)
519
+ array_1.flags.writeable = array_1_writeable
520
- mutable = np.arange(0, 100, 10)
521
+ array_2 = np.arange(0, 100, 10)
522
+ array_2.flags.writeable = array_2_writeable
523
- hundred_elements = np.arange(100)
- tm.assert_categorical_equal(cut(hundred_elements, readonly),
524
- cut(hundred_elements, mutable))
+ hundred_elements = np.arange(100)
525
+
526
+ tm.assert_categorical_equal(cut(hundred_elements, array_1),
527
+ cut(hundred_elements, array_2))
528
529
+ for (a1_writeable, a2_writeable) in [[True, True], [True, False], [False, False]]:
530
+ _test_memview_cut(a1_writeable, a2_writeable)
531
532
533
def curpath():
0 commit comments