@@ -59,29 +59,21 @@ def test_nonzero(self):
5959 self.assertTrue(bool(nd.array('test', type = ndt.string)))
6060 """
6161
62- """
63- # UNCOMMENT ME
6462 def test_nonzero_errors (self ):
6563 # Non-scalars raise errors like NumPy, because their
6664 # truth value is ambiguous
6765 self .assertRaises (ValueError , bool , nd .array ([0 ]))
6866 self .assertRaises (ValueError , bool , nd .array ([1 , 2 , 3 ]))
6967 self .assertRaises (ValueError , bool , nd .array (['abc' , 3 ], type = '{x:string, y:int32}' ))
70- """
7168
72- """
73- # UNCOMMENT ME
7469 def test_iter (self ):
7570 # Iteration of a 1D array
7671 a = nd .array ([1 , 2 , 3 ])
7772 self .assertEqual ([nd .as_py (x ) for x in a ], [1 , 2 , 3 ])
7873 # Iteration of a 2D array
7974 a = nd .array ([[1 , 2 , 3 ], [4 ,5 ,6 ]])
8075 self .assertEqual ([nd .as_py (x ) for x in a ], [[1 , 2 , 3 ], [4 ,5 ,6 ]])
81- """
8276
83- """
84- # UNCOMMENT ME
8577 def test_iter_fixed_dim (self ):
8678 # Iteration of a 1D array
8779 a = nd .array ([1 , 2 , 3 ], type = '3 * int64' )
@@ -91,10 +83,7 @@ def test_iter_fixed_dim(self):
9183 a = nd .array ([[1 , 2 , 3 ], [4 ,5 ,6 ]], type = '2 * 3 * int64' )
9284 self .assertEqual (len (a ), 2 )
9385 self .assertEqual ([nd .as_py (x ) for x in a ], [[1 , 2 , 3 ], [4 ,5 ,6 ]])
94- """
9586
96- """
97- # UNCOMMENT ME
9887 def test_contiguous (self ):
9988 # Scalar is contiguous
10089 a = nd .array (3 )
@@ -125,7 +114,6 @@ def test_contiguous(self):
125114 a = nd .array ([[1 , 3 , 5 , 2 ], [1 , 2 , 3 , 4 ]])[::- 1 , ::- 1 ]
126115 self .assertFalse (nd .is_c_contiguous (a ))
127116 self .assertFalse (nd .is_f_contiguous (a ))
128- """
129117
130118 """
131119 def test_uint_value_limits(self):
0 commit comments