Skip to content

Commit

Permalink
Possible fix for Joerg's unit test failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed May 1, 2012
1 parent 44fdd5c commit 4dfa763
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,11 @@ def test_Image_subImage():
image[bounds] /= 100
np.testing.assert_array_equal(image[bounds].array, (sub_array),
err_msg="image[bounds] /= 100 does not set correctly for dtype = "+str(types[i]))
image[bounds] = galsim.ImageView[types[i]](100*sub_array)
image[bounds] = galsim.ImageView[types[i]]((100*sub_array).astype(types[i]))
np.testing.assert_array_equal(image.array, (100*ref_array),
err_msg="image[bounds] /= 100 set wrong locations for dtype = "+str(types[i]))

im2 = galsim.ImageView[types[i]](sub_array.astype(types[i]))
im2 = galsim.ImageView[types[i]](sub_array)
image = galsim.ImageView[types[i]](ref_array.astype(types[i]))
image[bounds] += im2
np.testing.assert_array_equal(image[bounds].array, (2*sub_array),
Expand All @@ -556,7 +556,7 @@ def test_Image_subImage():
image[bounds] -= im2
np.testing.assert_array_equal(image[bounds].array, sub_array,
err_msg="image[bounds] -= im2 does not set correctly for dtype = "+str(types[i]))
image[bounds] = galsim.ImageView[types[i]](2*sub_array)
image[bounds] = galsim.ImageView[types[i]]((2*sub_array).astype(types[i]))
np.testing.assert_array_equal(image.array, (2*ref_array),
err_msg="image[bounds] -= im2 set wrong locations for dtype = "+str(types[i]))

Expand All @@ -572,7 +572,7 @@ def test_Image_subImage():
image[bounds] /= im2
np.testing.assert_array_equal(image[bounds].array, (2*sub_array),
err_msg="image[bounds] /= im2 does not set correctly for dtype = "+str(types[i]))
image[bounds] = galsim.ImageView[types[i]](2*sub_array**2)
image[bounds] = galsim.ImageView[types[i]]((2*sub_array**2).astype(types[i]))
np.testing.assert_array_equal(image.array, (2*ref_array**2),
err_msg="image[bounds] /= im2 set wrong locations for dtype = "+str(types[i]))

Expand Down

0 comments on commit 4dfa763

Please sign in to comment.