Lines Matching refs:nd2

3232         nd2 = ndarray(1729, shape=[], format='L', flags=ND_WRITABLE)
3234 w = memoryview(nd2)
3237 self.assertEqual(v, nd2)
3238 self.assertEqual(nd2, v)
3248 self.assertNotEqual(v, nd2)
3249 self.assertNotEqual(nd2, v)
3266 nd2 = ndarray((1729, 1.2, b'12345'), shape=[], format='hf5s',
3269 w = memoryview(nd2)
3272 self.assertEqual(v, nd2)
3273 self.assertEqual(nd2, v)
3279 nd2 = ndarray((-1729, 1.2, b'12345'), shape=[], format='hf5s',
3282 w = memoryview(nd2)
3285 self.assertNotEqual(v, nd2)
3286 self.assertNotEqual(nd2, v)
3290 self.assertEqual(w, nd2)
3296 nd2 = ndarray([-529, 576, -625, 676, 729], shape=[5], format='@h')
3298 w = memoryview(nd2)
3301 self.assertEqual(w, nd2)
3302 self.assertNotEqual(v, nd2)
3308 nd2 = ndarray([-529, 576, -625, 676, 729], shape=[5], format='>h')
3310 w = memoryview(nd2)
3313 self.assertEqual(w, nd2)
3314 self.assertNotEqual(v, nd2)
3320 nd2 = ndarray([-529, 576, -625, 676, -729], shape=[5], format='@h')
3322 w = memoryview(nd2)
3324 self.assertEqual(v, nd2[::2])
3331 nd2 = ndarray([-529, 576, -625, 676, -729], shape=[5], format='<l')
3333 w = memoryview(nd2)
3335 self.assertEqual(v, nd2[::2])
3342 nd2 = ndarray([-529, 576, -625, 676, -729], shape=[5], format='@h',
3345 w = memoryview(nd2)
3347 self.assertEqual(v, nd2[::2])
3354 nd2 = ndarray([-529, 576, -625, 676, -729], shape=[5], format='> h',
3357 w = memoryview(nd2)
3359 self.assertEqual(v, nd2[::2])
3368 nd2 = ndarray([-900, -961], shape=[0], format='@h')
3370 w = memoryview(nd2)
3373 self.assertEqual(w, nd2)
3374 self.assertEqual(v, nd2)
3380 nd2 = ndarray([-900, -961], shape=[0], format='@ i')
3382 w = memoryview(nd2)
3385 self.assertEqual(w, nd2)
3386 self.assertEqual(v, nd2)
3394 nd2 = ndarray([900], shape=[4], strides=[0], format='L')
3396 w = memoryview(nd2)
3399 self.assertEqual(w, nd2)
3400 self.assertEqual(v, nd2)
3406 nd2 = ndarray([(900, 900)], shape=[4], strides=[0], format='!L h')
3408 w = memoryview(nd2)
3411 self.assertEqual(w, nd2)
3412 self.assertEqual(v, nd2)
3448 nd2 = ndarray(list(range(0, 30)), shape=[3, 2, 5], format='@h')
3450 w = memoryview(nd2)
3453 self.assertEqual(w, nd2)
3454 self.assertNotEqual(v, nd2)
3460 nd2 = ndarray([(-1.2, 1, 2)]*30, shape=[3, 2, 5], format='< f 2Q')
3462 w = memoryview(nd2)
3465 self.assertEqual(w, nd2)
3466 self.assertNotEqual(v, nd2)
3472 nd2 = ndarray(list(range(30)), shape=[3, 2, 5], format='L')
3474 w = memoryview(nd2)
3477 self.assertEqual(w, nd2)
3478 self.assertNotEqual(v, nd2)
3484 nd2 = ndarray([(0, 1, 2)]*21, shape=[7, 3], format='= Qx l xxL')
3486 w = memoryview(nd2)
3489 self.assertEqual(w, nd2)
3490 self.assertNotEqual(v, nd2)
3496 nd2 = ndarray(list(range(30)), shape=[2, 3, 5], format='l')
3498 w = memoryview(nd2)
3501 self.assertEqual(w, nd2)
3502 self.assertEqual(v, nd2)
3511 nd2 = ndarray(list(range(0, 30)), shape=[5, 2, 3], format='@h',
3514 w = memoryview(nd2)
3517 self.assertEqual(w, nd2)
3518 self.assertNotEqual(v, nd2)
3525 nd2 = ndarray([(-1, 2**64-1)]*6, shape=[2, 3], format='=qQ',
3528 w = memoryview(nd2)
3531 self.assertEqual(w, nd2)
3532 self.assertNotEqual(v, nd2)
3539 nd2 = ndarray(list(range(-15, 15)), shape=[3, 2, 5], format='l',
3542 w = memoryview(nd2)
3545 self.assertEqual(w, nd2)
3546 self.assertNotEqual(v, nd2)
3553 nd2 = ndarray(list(range(-15, 15)), shape=[3, 2, 5], format='l',
3556 w = memoryview(nd2)
3559 self.assertEqual(w, nd2)
3560 self.assertNotEqual(v, nd2)
3567 nd2 = ndarray(list(range(30)), shape=[5, 2, 3], format='@b',
3570 w = memoryview(nd2)
3573 self.assertEqual(w, nd2)
3574 self.assertEqual(v, nd2)
3584 nd2 = ndarray(lst2, shape=[3, 2, 5], format='l', flags=ND_FORTRAN)
3586 w = memoryview(nd2)
3589 self.assertEqual(w, nd2)
3597 nd2 = ndarray(lst2, shape=[3, 2, 5], format='d h c', flags=ND_FORTRAN)
3599 w = memoryview(nd2)
3602 self.assertEqual(w, nd2)
3609 nd2 = ex2[1:3:1, ::-2]
3611 w = memoryview(nd2)
3614 self.assertEqual(w, nd2)
3615 self.assertNotEqual(v, nd2)
3623 nd2 = ex2[1:3:1, ::-2]
3625 w = memoryview(nd2)
3628 self.assertEqual(w, nd2)
3629 self.assertEqual(v, nd2)
3636 nd2 = ndarray(list(range(30)), shape=[3, 2, 5], format='b')
3637 nd2 = ex2[1:3:, ::-2]
3639 w = memoryview(nd2)
3642 self.assertEqual(w, nd2)
3643 self.assertNotEqual(v, nd2)
3650 nd2 = ndarray(list(range(30)), shape=[3, 2, 5], format='b')
3651 nd2 = ex2[1:3:, ::-2]
3653 w = memoryview(nd2)
3656 self.assertEqual(w, nd2)
3657 self.assertNotEqual(v, nd2)
3664 nd2 = ndarray([(2, b'123')]*30, shape=[5, 3, 2], format='i3s')
3665 nd2 = ex2[1:3:, ::-2]
3667 w = memoryview(nd2)
3670 self.assertEqual(w, nd2)
3671 self.assertNotEqual(v, nd2)
3679 nd2 = ndarray(list(range(30)), shape=[5, 0, 2], format='@i')
3681 w = memoryview(nd2)
3684 self.assertEqual(w, nd2)
3685 self.assertNotEqual(v, nd2)
3691 nd2 = ndarray(list(range(30)), shape=[5, 0, 2], format='@i')
3693 w = memoryview(nd2)
3696 self.assertEqual(w, nd2)
3697 self.assertNotEqual(v, nd2)
3705 nd2 = ndarray([900], shape=[4, 5, 4], strides=[0, 0, 0], format='L')
3707 w = memoryview(nd2)
3710 self.assertEqual(w, nd2)
3711 self.assertEqual(v, nd2)
3718 nd2 = ndarray([(1, 2)], shape=[2, 5], strides=[0, 0], format='<lQ')
3720 w = memoryview(nd2)
3723 self.assertEqual(w, nd2)
3724 self.assertEqual(v, nd2)
3734 nd2 = ex2[1:3:1, ::-2]
3736 w = memoryview(nd2)
3739 self.assertEqual(w, nd2)
3740 self.assertNotEqual(v, nd2)
3753 nd2 = ex2[1:3:1, ::-2]
3756 w = memoryview(nd2)
3759 self.assertEqual(w, nd2)
3760 self.assertEqual(v, nd2)
3768 nd2 = ndarray(list(range(30)), shape=[3, 2, 5], format='b')
3769 nd2 = ex2[1:3:, ::-2]
3771 w = memoryview(nd2)
3774 self.assertEqual(w, nd2)
3775 self.assertNotEqual(v, nd2)
3785 nd2 = ex2[1:2:, ::-2]
3788 w = memoryview(nd2)
3791 self.assertEqual(w, nd2)
3792 self.assertNotEqual(v, nd2)
3800 nd2 = ex2[1:3:, ::-2]
3802 w = memoryview(nd2)
3805 self.assertEqual(w, nd2)
3806 self.assertEqual(v, nd2)
3819 nd2 = ex2[1:3:, ::-2]
3822 w = memoryview(nd2)
3825 self.assertEqual(w, nd2)
3826 self.assertNotEqual(v, nd2)
3834 nd2 = ndarray(lst2, shape=[3, 2, 5], format='l', flags=ND_FORTRAN|ND_PIL)
3836 w = memoryview(nd2)
3839 self.assertEqual(w, nd2)
3848 nd2 = ndarray(lst2, shape=[3, 2, 5], format='> 10p 9p d',
3851 w = memoryview(nd2)
3854 self.assertEqual(w, nd2)
4181 nd2 = ndarray(nd1, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4182 self.assertIs(nd2.obj, m)
4184 del nd1, nd2
4201 nd2 = ndarray(nd1, getbuf=PyBUF_FULL_RO, flags=ND_REDIRECT)
4202 self.assertIs(nd2.obj, m2)
4205 del nd1, nd2