Ejemplo n.º 1
0
 def test_delete_special_slice(self):
     r3 = Matrix(self.data)
     content = ['i', 'j', 1.1, 1]
     del r3.row[0:0]
     assert r3.row[1] == content
     assert r3.number_of_rows() == 2
Ejemplo n.º 2
0
 def test_empty_array_input(self):
     """Test empty array as input to Matrix"""
     m = Matrix([])
     assert m.number_of_columns() == 0
     assert m.number_of_rows() == 0
Ejemplo n.º 3
0
 def test_delete_a_slice(self):
     """Delete a slice"""
     r2 = Matrix(self.data)
     del r2.row[1:]
     assert r2.number_of_rows() == 1