Lines Matching refs:arr
79 arr = ndarray(list(range(12)), shape=(4, 3), format='<i')
80 self.assertTrue(arr.c_contiguous)
81 self.assertFalse(arr.f_contiguous)
82 pb = PickleBuffer(arr)
83 self.check_memoryview(pb, arr)
85 arr = arr[::2]
86 self.assertFalse(arr.c_contiguous)
87 self.assertFalse(arr.f_contiguous)
88 pb = PickleBuffer(arr)
89 self.check_memoryview(pb, arr)
91 arr = ndarray(list(range(12)), shape=(3, 4), strides=(4, 12), format='<i')
92 self.assertTrue(arr.f_contiguous)
93 self.assertFalse(arr.c_contiguous)
94 pb = PickleBuffer(arr)
95 self.check_memoryview(pb, arr)
113 arr = ndarray(list(range(3)), shape=(3,), format='<h')
115 self.check_raw(arr, equiv)
117 arr = ndarray(list(range(6)), shape=(2, 3), format='<h')
119 self.check_raw(arr, equiv)
121 arr = ndarray(list(range(6)), shape=(2, 3), strides=(2, 4),
123 # Note this is different from arr.tobytes()
125 self.check_raw(arr, equiv)
127 arr = ndarray(456, shape=(), format='<i')
129 self.check_raw(arr, equiv)
139 arr = ndarray(list(range(6)), shape=(6,), format='<i')[::2]
140 self.check_raw_non_contiguous(arr)
142 arr = ndarray(list(range(12)), shape=(4, 3), format='<i')[::2]
143 self.check_raw_non_contiguous(arr)