def test_ndarray_write(self): """Test :func:`colour.utilities.array.ndarray_write` definition.""" a = np.linspace(0, 1, 10) a.setflags(write=False) with self.assertRaises(ValueError): a += 1 with ndarray_write(a): a += 1
def test_ndarray_write(self): """ Tests :func:`colour.utilities.array.ndarray_write` definition. """ a = np.linspace(0, 1, 10) a.setflags(write=False) with self.assertRaises(ValueError): a += 1 with ndarray_write(a): a += 1