Lines Matching refs:ndarray
29 ndarray = None variable
44 from numpy import ndarray as numpy_array
627 return ndarray(items, shape=shape, strides=strides, format=fmt,
737 if isinstance(nd, ndarray):
764 @unittest.skipUnless(ndarray, 'ndarray object required for this test')
816 if isinstance(result, ndarray) or is_memoryview_format(fmt):
871 expected = ndarray(trans, shape=shape, format=ff,
877 expected = ndarray(flattened, shape=shape, format=ff)
900 y = ndarray(initlst, shape=shape, flags=ro, format=fmt)
920 y = ndarray(initlst, shape=shape, flags=ro|ND_FORTRAN,
936 y = ndarray(initlst, shape=shape, flags=f|ro, format=fmt)
990 self.assertRaises(BufferError, ndarray, ex, getbuf=req)
993 if isinstance(ex, ndarray) or is_memoryview_format(ex.format):
996 nd = ndarray(ex, getbuf=PyBUF_FULL_RO)
1015 nd = ndarray(ex, getbuf=req)
1074 ex1 = ndarray(_items, format=fmt, flags=flags,
1099 ex = ndarray(items, shape=[12], flags=ND_GETBUF_FAIL)
1100 self.assertRaises(BufferError, ndarray, ex)
1104 base = ndarray([9], [1])
1105 ex = ndarray(base, getbuf=PyBUF_SIMPLE)
1106 self.assertRaises(BufferError, ndarray, ex, getbuf=PyBUF_WRITABLE)
1107 self.assertRaises(BufferError, ndarray, ex, getbuf=PyBUF_ND)
1108 self.assertRaises(BufferError, ndarray, ex, getbuf=PyBUF_STRIDES)
1109 self.assertRaises(BufferError, ndarray, ex, getbuf=PyBUF_C_CONTIGUOUS)
1110 self.assertRaises(BufferError, ndarray, ex, getbuf=PyBUF_F_CONTIGUOUS)
1111 self.assertRaises(BufferError, ndarray, ex, getbuf=PyBUF_ANY_CONTIGUOUS)
1112 nd = ndarray(ex, getbuf=PyBUF_SIMPLE)
1117 ex = ndarray(items, shape=shape, flags=order|ND_WRITABLE)
1122 nd = ndarray(ex, getbuf=flags)
1127 nd = ndarray([9], [1])
1128 ndm = ndarray([9], [1], flags=ND_VAREXPORT)
1131 for c in (ndarray, nd.push, ndm.push):
1206 self.assertRaises(BufferError, ndarray, b'123', getbuf=PyBUF_WRITABLE)
1209 nd = ndarray([9], [1], flags=ND_VAREXPORT)
1213 nd = ndarray(b'123')
1218 nd = ndarray([9], [1])
1234 nd = ndarray(list(range(100)), shape=[1]*100)
1237 nd = ndarray(list(range(12)), shape=[3,4])
1244 ex = ndarray([1,2,3], shape=[3], format='L')
1245 nd = ndarray(ex, getbuf=PyBUF_SIMPLE)
1249 ex1 = ndarray([1,2,3], shape=[3], format='L')
1250 ex2 = ndarray(ex1)
1251 nd = ndarray(ex2)
1254 nd = ndarray([(1,)*200], shape=[1], format='L'*200)
1258 nd = ndarray(list(range(n)), shape=[1]*n)
1262 nd = ndarray([1], shape=[1])
1273 nd = ndarray([1], shape=[1])
1279 nd = ndarray([1], shape=[1])
1287 nd = ndarray([1,2,3], shape=[3], flags=ND_VAREXPORT)
1304 nd = ndarray(scalar, shape=(), format=fmt)
1316 nd = ndarray(items, shape=[nitems], format=fmt, flags=flags)
1336 nd = ndarray(items, shape=shape, strides=strides,
1345 ex = ndarray(items, shape=(3, 4), strides=(1, 3))
1346 nd = ndarray(ex, getbuf=PyBUF_F_CONTIGUOUS|PyBUF_FORMAT)
1363 nd = ndarray(items, shape=shape, format=fmt, flags=flags)
1374 ex = ndarray(items, shape=shape, format=fmt)
1375 nd = ndarray(ex, getbuf=PyBUF_CONTIG_RO|PyBUF_FORMAT)
1384 nd = ndarray(items, shape=shape, format=fmt,
1396 nd = ndarray([1], shape=[1])
1403 nd = ndarray([1], shape=[1], flags=ND_WRITABLE)
1410 nd = ndarray([1], shape=[1], flags=ND_WRITABLE)
1420 nd = ndarray(items, shape=[len(items)], format="B", flags=ND_WRITABLE)
1429 nd = ndarray(items, shape=[len(items)], format="LQ", flags=ND_WRITABLE)
1435 nd = ndarray(1, shape=(), flags=ND_WRITABLE)
1460 ex = ndarray(list(range(2*4)), shape=[2, 4], flags=ND_WRITABLE)
1461 nd = ndarray(ex, getbuf=PyBUF_CONTIG)
1471 nd = ndarray(items, shape=[5], format=fmt)
1489 ex = ndarray(items, shape=[5], flags=ND_WRITABLE, format=fmt)
1490 nd = ndarray(ex, getbuf=PyBUF_CONTIG|PyBUF_FORMAT)
1503 ex = ndarray(items, shape=[5])
1504 nd = ndarray(ex, getbuf=PyBUF_CONTIG_RO)
1510 ex = ndarray(items, shape=[5])
1511 nd = ndarray(ex, getbuf=PyBUF_SIMPLE)
1519 nd = ndarray(items, shape=[5], format=fmt, flags=ND_WRITABLE)
1531 nd = ndarray(items, shape=[5], format=fmt, flags=ND_WRITABLE)
1545 nd = ndarray(items, shape=[5], format=fmt, flags=ND_WRITABLE)
1554 nd = ndarray(items, shape=[5], format=fmt, flags=ND_WRITABLE)
1571 nd = ndarray(items, shape=shape, format=fmt, flags=flags)
1582 nd = ndarray(items, shape=shape, format=fmt,
1594 nd = ndarray(1, shape=())
1601 nd = ndarray(items, shape=[5], format=fmt)
1616 xl = ndarray(items, shape=[8], flags=ND_WRITABLE)
1622 xl = ndarray(items, shape=[8], flags=ND_WRITABLE)
1623 ex = ndarray(items, shape=[8], flags=ND_WRITABLE)
1624 xr = ndarray(ex, getbuf=PyBUF_ND)
1628 nd = ndarray(items, shape=[8], format="L", flags=ND_WRITABLE)
1633 nd = ndarray(items, shape=[2,4], format="L", flags=ND_WRITABLE)
1650 xl = ndarray(items, shape=[8], format="B", flags=ND_WRITABLE)
1651 xr = ndarray(items, shape=[8], format="b")
1660 xl = ndarray(items, shape=[8], format="B", flags=ND_WRITABLE)
1661 yr = ndarray(items, shape=[8], format="L")
1670 xl = ndarray(items, shape=[2, 4], format="b", flags=ND_WRITABLE)
1671 xr = ndarray(items, shape=[8], format="b")
1680 xl = ndarray(items, shape=[8], format="b", flags=ND_WRITABLE)
1681 xr = ndarray(items, shape=[8], format="b")
1694 x = ndarray(items, shape=[8], format="b", flags=ND_PIL)
1697 ex = ndarray(items, shape=[8], format="B")
1698 x = ndarray(ex, getbuf=PyBUF_SIMPLE)
1704 x = ndarray(items, shape=[12], format="L", flags=ND_WRITABLE)
1705 y = ndarray(items, shape=[12], format="L")
1716 x = ndarray(items, shape=[3, 4], format="L", flags=ND_WRITABLE)
1717 y = ndarray(items, shape=[4, 3], format="L")
1731 nd = ndarray(items, shape=shape, format=fmt, flags=flags)
1762 nd = ndarray(items, shape=shape, format=fmt)
1764 ex = ndarray(items, shape=shape, format=fmt)
1795 nd = ndarray(items, shape=[5], format=fmt, flags=f)
1796 ex = ndarray(items, shape=[5], format=fmt, flags=f)
1854 nd = ndarray(items, shape=shape, format=fmt,
2009 nd = ndarray(items, shape=[3,4], flags=ND_PIL)
2010 ex = ndarray(nd)
2022 nd = ndarray([1,2,3], shape=[0], flags=flags)
2028 nd = ndarray([1,2,3], shape=[0,3,3], flags=flags)
2031 nd = ndarray([1,2,3], shape=[3,0,3], flags=flags)
2034 nd = ndarray([1,2,3], shape=[3,3,0], flags=flags)
2041 nd = ndarray([1], shape=[5], strides=[0], flags=flags)
2048 nd = ndarray(list(range(20)), shape=[3], offset=7)
2054 nd = ndarray(list(range(3)), shape=[3], flags=flags)
2060 nd = ndarray(list(range(3)), shape=[3], flags=flags)
2065 ex = ndarray(list(range(20)), shape=[2,2,5])
2067 nd = ndarray(ex, getbuf=PyBUF_ND|PyBUF_FORMAT)
2077 x = ndarray(list(range(12)), shape=[3,4])
2078 y = ndarray(list(range(12)), shape=[4,3])
2081 x = ndarray([1], shape=[1], format="B")
2088 nd = ndarray(a)
2094 nd = ndarray(list(range(12)), shape=[12])
2098 nd = ndarray(list(range(12)), shape=[3,4])
2101 nd = ndarray(list(range(12)), shape=[3,2,2])
2106 nd = ndarray(list(range(12)), shape=[3,4], flags=ND_FORTRAN)
2110 nd = ndarray(list(range(12)), shape=[2,3,2], flags=ND_FORTRAN)
2115 nd = ndarray(list(range(12)), shape=[2,2,3], flags=ND_PIL)
2119 nd = ndarray(list(range(12)), shape=[2,2,3], format='L')
2141 nd = ndarray(9, shape=(), format="L", flags=ND_WRITABLE)
2148 nd = ndarray([1], shape=[0], format="L", flags=ND_WRITABLE)
2154 nd = ndarray(list(range(8)), shape=[2, 0, 7], format="L",
2166 nd = ndarray([1], shape=[1], format="h", flags=f|ND_WRITABLE)
2173 nd = ndarray([1, 2, 3], shape=[3], format="b", flags=f|ND_WRITABLE)
2181 nd = ndarray([1, 2, 3], shape=[2], strides=[2], flags=ND_WRITABLE)
2264 nd = ndarray(lst, shape=[3, 4], flags=f|ND_WRITABLE)
2272 x = ndarray(transpose(lst, [4, 3]), shape=[3, 4],
2287 y = ndarray([v for v in b], shape=[3, 4], flags=ND_WRITABLE)
2295 x = ndarray(transpose(lst, [3, 4]), shape=[4, 3],
2298 x = ndarray(lst, shape=[3, 4], flags=ND_WRITABLE)
2310 y = ndarray([v for v in b], shape=[3, 4], flags=ND_FORTRAN|ND_WRITABLE)
2318 x = ndarray(lst, shape=[3, 4], flags=ND_WRITABLE)
2334 y = ndarray([v for v in b], shape=[3, 4], flags=f|ND_WRITABLE)
2341 nd = ndarray(list(range(12)), shape=[3, 4], flags=ND_WRITABLE|ND_PIL)
2346 y = ndarray([v for v in b], shape=[3, 4], flags=ND_WRITABLE)
2351 x = ndarray(transpose(lst, [3, 4]), shape=[4, 3], flags=ND_WRITABLE)
2353 y = ndarray([v for v in b], shape=[3, 4], flags=ND_FORTRAN|ND_WRITABLE)
2359 y = ndarray([v for v in b], shape=[3, 4], flags=ND_WRITABLE)
2370 ex = ndarray(items, shape=shape)
2392 nd = ndarray(ex, getbuf=PyBUF_CONTIG_RO|PyBUF_FORMAT)
2401 nd = ndarray(ex, getbuf=PyBUF_SIMPLE)
2417 ex = ndarray(items, shape=shape, flags=ND_FORTRAN)
2442 ex = ndarray(items, shape=shape, flags=ND_PIL)
2465 ex = ndarray([1,2,3], shape=[3])
2466 nd = ndarray(ex, getbuf=PyBUF_SIMPLE)
2468 nd = ndarray(ex, getbuf=PyBUF_CONTIG_RO|PyBUF_FORMAT)
2472 nd = ndarray([1]*128, shape=[1]*128, format='L')
2486 ex = ndarray(items, shape=shape)
2507 a = ndarray(items, shape=[2, 4], format="b")
2509 a = ndarray(items, shape=[2, 2, 2], format="b")
2537 ex = ndarray(items, shape=[10], format=fmt, flags=ND_WRITABLE)
2538 nd = ndarray(items, shape=[10], format=fmt, flags=ND_WRITABLE)
2572 ex = ndarray([1,2,3], shape=[3], strides=[0])
2585 ex = ndarray(list(range(32)), shape=[32//ssize], format=sformat)
2590 ex = ndarray(sitems, shape=[1], format=sfmt)
2604 ex = ndarray(list(range(2*2*size_d)), shape=[2,2,size_d], format='h')
2608 ex = ndarray(list(range(120)), shape=[1,2,3,4,5])
2632 ex = ndarray([(1,2), (3,4)], shape=[2], format="II")
2639 ex = ndarray(list(range(120)), shape=[1,2,3,4,5])
2644 ex = ndarray(list(range(120)), shape=[2*3*4*5])
2653 ex = ndarray(list([9 for _ in range(3*5*7*11)]), shape=[3,5,7,11])
2658 nd = ndarray(list(range(128)), shape=[128], format='I')
2663 ex = ndarray(list([9 for _ in range(3*5*7*11)]), shape=[3*5*7*11])
2668 ex = ndarray(list([9 for _ in range(3*5*7*11)]), shape=[3*5*7*11])
2673 nd = ndarray(list(range(128)), shape=[128], format='I')
2675 nd = ndarray(list(range(128)), shape=[128], format='B')
2720 ex = ndarray(9, shape=[], format='I')
2731 ex = ndarray([9]*destsize, shape=[destsize], format='B')
2748 ex = ndarray(items, shape=[31], format=fmt, flags=ND_WRITABLE)
2770 ex = ndarray(items, shape=shape, format=fmt)
2782 nd = ndarray(titems, shape=tshape, format=tfmt)
2850 ex = ndarray(list(range(2*3*5*7*11)), shape=[11,2,7,3,5], format='L')
2854 ex = ndarray([(2, 5), (7, 11)], shape=[2], format='lh')
2858 ex = ndarray([b'12345'], shape=[1], format="s")
2862 ex = ndarray([b"a",b"b",b"c",b"d",b"e",b"f"], shape=[2,3], format='s')
2885 ex = ndarray(9.0, [], format='f')
2899 ex = ndarray(12.5, shape=[], format='d')
2906 ex = ndarray((1,2,3), shape=[], format='iii')
2911 ex = ndarray(list(range(7)), shape=[7], flags=ND_WRITABLE)
2923 ex = ndarray(list(range(12)), shape=[3,4], flags=ND_WRITABLE)
2952 ex = ndarray(12.5, shape=[], format='f', flags=ND_WRITABLE)
2961 ex = ndarray(list(range(7)), shape=[7])
2966 ex = ndarray(list(range(7)), shape=[7], flags=ND_WRITABLE)
2981 ex = ndarray([1,2,3], shape=[3], format=fmt, flags=ND_WRITABLE)
2988 ex = ndarray([b'1', b'2', b'3'], shape=[3], format='c',
2994 ex = ndarray([True, False, True], shape=[3], format='?',
3001 nd = ndarray([b'x'], shape=[1], format='c', flags=ND_WRITABLE)
3005 ex = ndarray(list(range(120)), shape=[1,2,3,4,5], flags=ND_WRITABLE)
3027 ex = ndarray(list(range(1)), shape=[1], format="xL", flags=ND_WRITABLE)
3031 ex = ndarray([b'12345'], shape=[1], format="s", flags=ND_WRITABLE)
3036 ex = ndarray(list(range(12)), shape=[3,4], flags=ND_WRITABLE)
3060 ex = ndarray(list(range(12)), shape=[12], flags=ND_WRITABLE)
3072 ex = ndarray(list(range(12)), shape=[12], flags=ND_WRITABLE)
3090 ex1 = ndarray(list(range(12)), shape=[12], strides=[-1], offset=11,
3092 ex2 = ndarray(list(range(24)), shape=[12], strides=[2], flags=flags)
3206 nd = ndarray([(0, 0)], shape=[1], format='l x d x', flags=ND_WRITABLE)
3231 nd1 = ndarray(1729, shape=[], format='@L')
3232 nd2 = ndarray(1729, shape=[], format='L', flags=ND_WRITABLE)
3256 nd = ndarray(list(range(12)), shape=[12], flags=ND_WRITABLE|ND_PIL)
3257 ex = ndarray(list(range(12)), shape=[12], flags=ND_WRITABLE|ND_PIL)
3265 nd1 = ndarray((1729, 1.2, b'12345'), shape=[], format='Lf5s')
3266 nd2 = ndarray((1729, 1.2, b'12345'), shape=[], format='hf5s',
3278 nd1 = ndarray((1729, 1.2, b'12345'), shape=[], format='Lf5s')
3279 nd2 = ndarray((-1729, 1.2, b'12345'), shape=[], format='hf5s',
3295 nd1 = ndarray([-529, 576, -625, 676, -729], shape=[5], format='@h')
3296 nd2 = ndarray([-529, 576, -625, 676, 729], shape=[5], format='@h')
3307 nd1 = ndarray([-529, 576, -625, 676, -729], shape=[5], format='<i')
3308 nd2 = ndarray([-529, 576, -625, 676, 729], shape=[5], format='>h')
3319 nd1 = ndarray([-529, -625, -729], shape=[3], format='@h')
3320 nd2 = ndarray([-529, 576, -625, 676, -729], shape=[5], format='@h')
3330 nd1 = ndarray([-529, -625, -729], shape=[3], format='!h')
3331 nd2 = ndarray([-529, 576, -625, 676, -729], shape=[5], format='<l')
3341 nd1 = ndarray([-529, -625, -729], shape=[3], format='@h')
3342 nd2 = ndarray([-529, 576, -625, 676, -729], shape=[5], format='@h',
3353 nd1 = ndarray([-529, -625, -729], shape=[3], format='h 0c')
3354 nd2 = ndarray([-529, 576, -625, 676, -729], shape=[5], format='> h',
3367 nd1 = ndarray([900, 961], shape=[0], format='@h')
3368 nd2 = ndarray([-900, -961], shape=[0], format='@h')
3379 nd1 = ndarray([900, 961], shape=[0], format='= h0c')
3380 nd2 = ndarray([-900, -961], shape=[0], format='@ i')
3393 nd1 = ndarray([900, 900, 900, 900], shape=[4], format='@L')
3394 nd2 = ndarray([900], shape=[4], strides=[0], format='L')
3405 nd1 = ndarray([(900, 900)]*4, shape=[4], format='@ Li')
3406 nd2 = ndarray([(900, 900)], shape=[4], strides=[0], format='!L h')
3423 nd = ndarray(items, shape=[n], format=fmt, flags=flags)
3436 nd = ndarray(items, shape=[n], format=fmt, flags=flags)
3447 nd1 = ndarray(list(range(-15, 15)), shape=[3, 2, 5], format='@h')
3448 nd2 = ndarray(list(range(0, 30)), shape=[3, 2, 5], format='@h')
3459 nd1 = ndarray([(0, 1, 2)]*30, shape=[3, 2, 5], format='=f q xxL')
3460 nd2 = ndarray([(-1.2, 1, 2)]*30, shape=[3, 2, 5], format='< f 2Q')
3471 nd1 = ndarray(list(range(30)), shape=[2, 3, 5], format='L')
3472 nd2 = ndarray(list(range(30)), shape=[3, 2, 5], format='L')
3483 nd1 = ndarray([(0, 1, 2)]*21, shape=[3, 7], format='! b B xL')
3484 nd2 = ndarray([(0, 1, 2)]*21, shape=[7, 3], format='= Qx l xxL')
3495 nd1 = ndarray(list(range(30)), shape=[2, 3, 5], format='L')
3496 nd2 = ndarray(list(range(30)), shape=[2, 3, 5], format='l')
3509 nd1 = ndarray(list(range(-15, 15)), shape=[5, 2, 3], format='@h',
3511 nd2 = ndarray(list(range(0, 30)), shape=[5, 2, 3], format='@h',
3523 nd1 = ndarray([(2**64-1, -1)]*6, shape=[2, 3], format='=Qq',
3525 nd2 = ndarray([(-1, 2**64-1)]*6, shape=[2, 3], format='=qQ',
3537 nd1 = ndarray(list(range(-15, 15)), shape=[2, 3, 5], format='l',
3539 nd2 = ndarray(list(range(-15, 15)), shape=[3, 2, 5], format='l',
3551 nd1 = ndarray(list(range(-15, 15)), shape=[2, 3, 5], format='0ll',
3553 nd2 = ndarray(list(range(-15, 15)), shape=[3, 2, 5], format='l',
3565 nd1 = ndarray(list(range(30)), shape=[5, 2, 3], format='@h',
3567 nd2 = ndarray(list(range(30)), shape=[5, 2, 3], format='@b',
3583 nd1 = ndarray(lst1, shape=[3, 2, 5], format='@l')
3584 nd2 = ndarray(lst2, shape=[3, 2, 5], format='l', flags=ND_FORTRAN)
3596 nd1 = ndarray(lst1, shape=[3, 2, 5], format='d b c')
3597 nd2 = ndarray(lst2, shape=[3, 2, 5], format='d h c', flags=ND_FORTRAN)
3606 ex1 = ndarray(list(range(40)), shape=[5, 8], format='@I')
3608 ex2 = ndarray(list(range(40)), shape=[5, 8], format='I')
3620 ex1 = ndarray([(2**31-1, -2**31)]*22, shape=[11, 2], format='=ii')
3622 ex2 = ndarray([(2**31-1, -2**31)]*22, shape=[11, 2], format='>ii')
3634 ex1 = ndarray(list(range(30)), shape=[2, 3, 5], format='b')
3636 nd2 = ndarray(list(range(30)), shape=[3, 2, 5], format='b')
3648 ex1 = ndarray(list(range(30)), shape=[2, 3, 5], format='B')
3650 nd2 = ndarray(list(range(30)), shape=[3, 2, 5], format='b')
3662 ex1 = ndarray([(2, b'123')]*30, shape=[5, 3, 2], format='b3s')
3664 nd2 = ndarray([(2, b'123')]*30, shape=[5, 3, 2], format='i3s')
3678 nd1 = ndarray(list(range(30)), shape=[0, 3, 2], format='i')
3679 nd2 = ndarray(list(range(30)), shape=[5, 0, 2], format='@i')
3690 nd1 = ndarray(list(range(30)), shape=[0, 3, 2], format='i')
3691 nd2 = ndarray(list(range(30)), shape=[5, 0, 2], format='@i')
3704 nd1 = ndarray([900]*80, shape=[4, 5, 4], format='@L')
3705 nd2 = ndarray([900], shape=[4, 5, 4], strides=[0, 0, 0], format='L')
3717 nd1 = ndarray([(1, 2)]*10, shape=[2, 5], format='=lQ')
3718 nd2 = ndarray([(1, 2)], shape=[2, 5], strides=[0, 0], format='<lQ')
3731 ex1 = ndarray(list(range(40)), shape=[5, 8], format='@I')
3733 ex2 = ndarray(list(range(40)), shape=[5, 8], format='I', flags=ND_PIL)
3745 ex1 = ndarray([(2**64-1, -1)]*40, shape=[5, 8], format='=Qq',
3750 ex2 = ndarray([(2**64-1, -1)]*40, shape=[5, 8], format='>Qq',
3765 ex1 = ndarray(list(range(30)), shape=[2, 3, 5], format='b',
3768 nd2 = ndarray(list(range(30)), shape=[3, 2, 5], format='b')
3780 ex1 = ndarray([(2**8-1, -1)]*40, shape=[2, 3, 5], format='Bb',
3784 ex2 = ndarray([(2**8-1, -1)]*40, shape=[3, 2, 5], format='Bb')
3797 ex1 = ndarray(list(range(30)), shape=[5, 3, 2], format='i', flags=ND_PIL)
3799 ex2 = ndarray(list(range(30)), shape=[5, 3, 2], format='@I', flags=ND_PIL)
3811 ex1 = ndarray([(b'hello', b'', 1)]*27, shape=[3, 3, 3], format='5s0sP',
3816 ex2 = ndarray([(b'hello', b'', 1)]*27, shape=[3, 3, 3], format='5s0sP',
3833 nd1 = ndarray(lst1, shape=[3, 2, 5], format='@l', flags=ND_PIL)
3834 nd2 = ndarray(lst2, shape=[3, 2, 5], format='l', flags=ND_FORTRAN|ND_PIL)
3847 nd1 = ndarray(lst1, shape=[3, 2, 5], format='< 10p 9p d', flags=ND_PIL)
3848 nd2 = ndarray(lst2, shape=[3, 2, 5], format='> 10p 9p d',
3861 x = ndarray([2**63]*120, shape=[3,5,2,2,2], format=byteorder+'Q')
3862 y = ndarray([2**63]*120, shape=[3,5,2,2,2], format=byteorder+'Q',
3873 x = ndarray([(2**63, 2**31, 2**15)]*120, shape=[3,5,2,2,2],
3875 y = ndarray([(2**63, 2**31, 2**15)]*120, shape=[3,5,2,2,2],
3898 self.assertRaises(ValueError, ndarray, m)
3931 nd = ndarray(t, shape=[5], format='@h')
3936 nd = ndarray([t], shape=[1], format='>hQiLl')
3941 nd = ndarray([t for _ in range(12)], shape=[2,2,3], format='=hQiLl')
3946 nd = ndarray([t for _ in range(120)], shape=[5,2,2,3,2],
3971 nd = ndarray([1, 2, 3], shape=[2], strides=[2])
3975 nd = ndarray(9, shape=(), format="L")
3982 nd = ndarray(9, shape=(), format="L", flags=ND_WRITABLE)
4000 nd = ndarray([1], shape=[0], format="L", flags=ND_WRITABLE)
4007 nd = ndarray(list(range(8)), shape=[2, 0, 7], format="L",
4011 self.assertEqual(ndarray(m).tolist(), [[], []])
4014 nd = ndarray([1], shape=[1], format="h", flags=ND_WRITABLE)
4020 nd = ndarray([1, 2, 3], shape=[3], format="b", flags=ND_WRITABLE)
4027 nd = ndarray([1, 2, 3], shape=[2], strides=[2], flags=ND_WRITABLE)
4046 nd = ndarray(list(range(12)), shape=[3, 4], flags=ND_WRITABLE)
4049 self.assertEqual(ndarray(m).tolist(), nd.tolist())
4053 self.assertEqual(ndarray(m).tolist(), nd.tolist())
4055 nd = ndarray(list(range(12)), shape=[3, 4],
4059 self.assertEqual(ndarray(m).tolist(), nd.tolist())
4063 self.assertEqual(ndarray(m).tolist(), nd.tolist())
4066 nd = ndarray(list(range(12)), shape=[3, 4], flags=ND_WRITABLE|ND_PIL)
4071 self.assertEqual(ndarray(m).tolist(), nd.tolist())
4074 nd = ndarray([1,2,3,4,5], shape=[3], strides=[2])
4091 nd = ndarray(list(range(12)), shape=[2,3,2], format="L")
4125 nd = ndarray(list(range(30)), shape=[3,2,5], flags=ND_FORTRAN)
4130 nd = ndarray(list(range(30)), shape=[3,2,5])
4136 nd = ndarray(list(range(30)), shape=[2,5,3], flags=ND_PIL)
4142 x = ndarray(list(range(12)), shape=[12], format='B')
4145 y = ndarray(list(range(12)), shape=[12], format='b')
4152 nd = ndarray(list(range(12)), shape=[2,2,3], format='L')
4156 nd = ndarray(list(range(-6, 6)), shape=[2,2,3], format='h')
4160 nd = ndarray(list(range(12)), shape=[2,2,3], format='= L')
4164 nd = ndarray(list(range(-6, 6)), shape=[2,2,3], format='< h')
4173 nd = ndarray(m) # re-exporter
4180 nd1 = ndarray(m, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4181 nd2 = ndarray(nd1, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4191 nd = ndarray(m2) # re-exporter
4200 nd1 = ndarray(m2, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4201 nd2 = ndarray(nd1, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4209 nd = ndarray([1,2,3], shape=[3], flags=ND_VAREXPORT)
4243 x = ndarray(list(range(12)), shape=[2,2,3], format='l')
4244 y = ndarray(x, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4245 z = ndarray(y, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4256 y = ndarray(m1, getbuf=PyBUF_FULL_RO, flags=flags)
4259 z = ndarray(m2, getbuf=PyBUF_FULL_RO, flags=flags)
4275 y = ndarray(m1, getbuf=PyBUF_FULL_RO, flags=flags)
4278 z = ndarray(m2, getbuf=PyBUF_FULL_RO, flags=flags)
4293 ex = ndarray(m)
4298 nd = ndarray([1.0 * x for x in range(12)], shape=[12], format='d')
4302 y = ndarray(x, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4303 z = ndarray(y, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4346 y = ndarray(x, getbuf=PyBUF_FULL_RO)
4347 z = ndarray(y, getbuf=PyBUF_FULL_RO)
4358 y = ndarray(x, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4359 z = ndarray(y, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4388 y = ndarray(x, getbuf=PyBUF_FULL_RO)
4389 z = ndarray(y, getbuf=PyBUF_FULL_RO)
4400 y = ndarray(x, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4401 z = ndarray(y, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4417 nd = ndarray([1,2,3], [3], flags=ND_GETBUF_FAIL|ND_GETBUF_UNDEFINED)
4421 x = ndarray([1,2,3], shape=[3], flags=ND_GETBUF_FAIL)