Lines Matching refs:memoryview
9 # Most ndarray tests also check that memoryview(ndarray) behaves in
11 # memoryview tests is now in this module.
120 MEMORYVIEW = NATIVE.copy()
131 fmtdict['m'] = MEMORYVIEW
132 fmtdict['@m'] = MEMORYVIEW
144 'memoryview': (['@m', 'm'], ['']),
228 """format suitable for memoryview"""
231 fmt[x-1] in MEMORYVIEW)
634 # memoryview casts
845 m = memoryview(result)
895 self.assertEqual(memoryview(y), memoryview(result))
907 self.assertEqual(memoryview(y), memoryview(result))
919 self.assertEqual(memoryview(y), memoryview(result))
923 m = memoryview(result)
926 ex = result.obj if isinstance(result, memoryview) else result
1052 m1 = memoryview(ex1)
1054 m2 = memoryview(ex2)
1194 m = memoryview(nd)
1262 m[0] = memoryview(nd)
1266 m[i] = memoryview(nd)
1347 # memoryview: reconstruct strides
1372 mv = memoryview(nd)
1379 mv = memoryview(nd)
1387 mv = memoryview(nd)
1397 mv = memoryview(nd)
1410 mv = memoryview(nd)
1453 mv = memoryview(nd)
1506 mv = memoryview(nd)
1529 mv = memoryview(nd)
1570 mv = memoryview(nd)
1581 mv = memoryview(nd)
1591 ml = memoryview(xl)
1603 mv = memoryview(nd)
1608 mv = memoryview(nd)
1618 # memoryview: not implemented
1626 ml = memoryview(xl)
1627 mr = memoryview(xr)
1636 ml = memoryview(xl)
1637 mr = memoryview(xr)
1646 ml = memoryview(xl)
1647 mr = memoryview(xr)
1656 ml = memoryview(xl)
1657 mr = memoryview(xr)
1683 ml = memoryview(x)
1684 mr = memoryview(y)
1740 mv = memoryview(ex)
1771 mv = memoryview(ex)
1805 if diff_structure: # memoryview cannot change shape
1863 mv = memoryview(x)
1874 mv = memoryview(y)
1939 ml = memoryview(xl)
1940 mr = memoryview(xr)
1954 ml = memoryview(yl)
1955 mr = memoryview(yr)
1997 mv = memoryview(nd)
2016 mv = memoryview(nd)
2044 m = memoryview(ex)
2262 self.assertEqual(memoryview(y), memoryview(nd))
2285 self.assertEqual(memoryview(y), memoryview(nd))
2309 self.assertEqual(memoryview(y), memoryview(nd))
2321 self.assertEqual(memoryview(y), memoryview(nd))
2328 self.assertEqual(memoryview(y), memoryview(nd))
2334 self.assertEqual(memoryview(y), memoryview(nd))
2345 m = memoryview(ex)
2358 # From memoryview:
2359 m2 = memoryview(m)
2392 m = memoryview(ex)
2405 # From memoryview:
2406 m2 = memoryview(m)
2417 m = memoryview(ex)
2427 # From memoryview:
2428 m2 = memoryview(m)
2435 self.assertRaises(TypeError, memoryview, b'9', 'x')
2437 self.assertRaises(TypeError, memoryview, {})
2441 self.assertRaises(BufferError, memoryview, nd)
2443 self.assertRaises(BufferError, memoryview, nd)
2447 self.assertRaises(ValueError, memoryview, nd)
2462 msrc = memoryview(ex)
2465 for fmt, _, _ in iter_format(1, 'memoryview'):
2466 msrc = memoryview(b'')
2480 check(memoryview(b''), vsize(base_struct + 1 * per_dim))
2482 check(memoryview(a), vsize(base_struct + 2 * per_dim))
2484 check(memoryview(a), vsize(base_struct + 3 * per_dim))
2510 for fmt, items, item in iter_format(10, 'memoryview'):
2513 m = memoryview(ex)
2548 msrc = memoryview(ex)
2560 msrc = memoryview(ex)
2565 msrc = memoryview(ex)
2579 msrc = memoryview(ex)
2583 m = memoryview(ex)
2607 m = memoryview(ex)
2614 m = memoryview(ex)
2619 m = memoryview(ex)
2628 m = memoryview(ex)
2633 m = memoryview(nd)
2638 m = memoryview(ex)
2643 m = memoryview(ex)
2648 m1 = memoryview(nd)
2650 m2 = memoryview(nd)
2696 m = memoryview(ex)
2707 m = memoryview(ex)
2717 m = memoryview(ex)
2721 for fmt, items, _ in iter_format(31, 'memoryview'):
2723 m = memoryview(ex)
2734 obj = 'memoryview' if is_byte_format(tfmt) else 'bytefmt'
2741 m = memoryview(ex)
2785 m1 = memoryview(point)
2796 m1 = memoryview(x)
2811 m = memoryview(a)
2821 m = memoryview(ex)
2825 m = memoryview(ex)
2829 m = memoryview(ex)
2833 m = memoryview(ex)
2837 m = memoryview(bytearray(9))
2850 m = memoryview(ex)
2856 m = memoryview(ex)
2870 m = memoryview(ex)
2877 m = memoryview(ex)
2882 m = memoryview(ex)
2894 m = memoryview(ex)
2923 m = memoryview(ex)
2932 m = memoryview(ex)
2937 m = memoryview(ex)
2952 m = memoryview(ex)
2960 m = memoryview(ex)
2966 m = memoryview(ex)
2972 m = memoryview(nd)
2976 m1 = memoryview(ex)
2998 m = memoryview(ex)
3002 m = memoryview(ex)
3007 m = memoryview(ex)
3031 m = memoryview(ex)
3043 m = memoryview(ex)
3063 m1 = memoryview(ex1)
3064 m2 = memoryview(ex2)
3111 m = memoryview(b)
3136 if have_resize: # memoryview cannot change shape
3152 v = memoryview(a)
3153 w = memoryview(b)
3159 v = memoryview(a)
3165 v = memoryview(a)
3166 w = memoryview(a)
3172 v = memoryview(a)
3178 self.assertNotEqual(memoryview(nd), nd)
3182 v = memoryview(a)
3192 a = memoryview(point)
3193 b = memoryview(point)
3203 v = memoryview(nd1)
3204 w = memoryview(nd2)
3228 m = memoryview(ex)
3238 v = memoryview(nd1)
3239 w = memoryview(nd2)
3251 v = memoryview(nd1)
3252 w = memoryview(nd2)
3267 v = memoryview(nd1)
3268 w = memoryview(nd2)
3279 v = memoryview(nd1)
3280 w = memoryview(nd2)
3291 v = memoryview(nd1)
3292 w = memoryview(nd2)
3302 v = memoryview(nd1)
3303 w = memoryview(nd2)
3314 v = memoryview(nd1)
3315 w = memoryview(nd2)
3326 v = memoryview(nd1)
3327 w = memoryview(nd2)
3339 v = memoryview(nd1)
3340 w = memoryview(nd2)
3351 v = memoryview(nd1)
3352 w = memoryview(nd2)
3365 v = memoryview(nd1)
3366 w = memoryview(nd2)
3377 v = memoryview(nd1)
3378 w = memoryview(nd2)
3391 fmt, items, singleitem = randitems(n, 'memoryview', '@', char)
3394 m = memoryview(nd)
3398 m = memoryview(nd)
3407 m = memoryview(nd)
3411 m = memoryview(nd)
3419 v = memoryview(nd1)
3420 w = memoryview(nd2)
3431 v = memoryview(nd1)
3432 w = memoryview(nd2)
3443 v = memoryview(nd1)
3444 w = memoryview(nd2)
3455 v = memoryview(nd1)
3456 w = memoryview(nd2)
3467 v = memoryview(nd1)
3468 w = memoryview(nd2)
3483 v = memoryview(nd1)
3484 w = memoryview(nd2)
3497 v = memoryview(nd1)
3498 w = memoryview(nd2)
3511 v = memoryview(nd1)
3512 w = memoryview(nd2)
3525 v = memoryview(nd1)
3526 w = memoryview(nd2)
3539 v = memoryview(nd1)
3540 w = memoryview(nd2)
3555 v = memoryview(nd1)
3556 w = memoryview(nd2)
3568 v = memoryview(nd1)
3569 w = memoryview(nd2)
3580 v = memoryview(nd1)
3581 w = memoryview(nd2)
3594 v = memoryview(nd1)
3595 w = memoryview(nd2)
3608 v = memoryview(nd1)
3609 w = memoryview(nd2)
3622 v = memoryview(nd1)
3623 w = memoryview(nd2)
3636 v = memoryview(nd1)
3637 w = memoryview(nd2)
3650 v = memoryview(nd1)
3651 w = memoryview(nd2)
3662 v = memoryview(nd1)
3663 w = memoryview(nd2)
3676 v = memoryview(nd1)
3677 w = memoryview(nd2)
3689 v = memoryview(nd1)
3690 w = memoryview(nd2)
3705 v = memoryview(nd1)
3706 w = memoryview(nd2)
3725 v = memoryview(nd1)
3726 w = memoryview(nd2)
3740 v = memoryview(nd1)
3741 w = memoryview(nd2)
3757 v = memoryview(nd1)
3758 w = memoryview(nd2)
3771 v = memoryview(nd1)
3772 w = memoryview(nd2)
3791 v = memoryview(nd1)
3792 w = memoryview(nd2)
3805 v = memoryview(nd1)
3806 w = memoryview(nd2)
3820 v = memoryview(nd1)
3821 w = memoryview(nd2)
3835 a = memoryview(x)
3836 b = memoryview(y)
3848 a = memoryview(x)
3849 b = memoryview(y)
3860 m = memoryview(a)
3864 self.assertRaises(ValueError, memoryview, m)
3865 # memoryview.cast()
3869 # memoryview.tolist()
3871 # memoryview.tobytes()
3887 m1 = memoryview(a)
3888 m2 = memoryview(b)
3902 m = memoryview(nd)
3907 m = memoryview(nd)
3912 m = memoryview(nd)
3918 m = memoryview(nd)
3928 a = memoryview(point)
4053 m = memoryview(a)
4062 m = memoryview(nd)
4072 #m = memoryview(nd)
4082 m = memoryview(b)
4096 m = memoryview(nd)
4102 m = memoryview(x)
4108 m = memoryview(x)
4113 a = memoryview(x)
4116 b = memoryview(y)
4123 m = memoryview(nd)
4127 m = memoryview(nd)
4131 m = memoryview(nd)
4135 m = memoryview(nd)
4140 # Create re-exporter from getbuffer(memoryview), then release the view.
4142 m = memoryview(a)
4149 m = memoryview(a)
4159 m1 = memoryview(a)
4160 m2 = memoryview(m1)
4168 m1 = memoryview(a)
4169 m2 = memoryview(m1)
4180 m1 = memoryview(nd)
4183 m2 = memoryview(nd)
4185 x = memoryview(m1)
4188 y = memoryview(m2)
4205 with memoryview(b) as m2:
4209 with memoryview(x) as m1:
4217 with memoryview(z) as m:
4224 with memoryview(x) as m1:
4227 with memoryview(y) as m2:
4230 with memoryview(z) as m3:
4243 with memoryview(x) as m1:
4246 with memoryview(y) as m2:
4249 with memoryview(z) as m3:
4259 # memoryview.release() fails if the view has exported buffers.
4262 with memoryview(x) as m:
4274 m = memoryview(z)
4300 y = memoryview(x)
4311 y = memoryview(x)
4318 m = memoryview(z)
4330 m = memoryview(z)
4342 y = memoryview(x)
4353 y = memoryview(x)
4360 m = memoryview(z)
4372 m = memoryview(z)
4388 self.assertRaises(BufferError, memoryview, nd)
4392 self.assertRaises(BufferError, memoryview, x)