Skip to content

Commit 2ceb789

Browse files
authored
Merge pull request #11 from GalSim-developers/remove-rounding-tests
test: remove changes to rounding
2 parents fee09ca + 5724050 commit 2ceb789

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

tests/test_celestial_galsim.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def test_angle():
127127
assert_raises(TypeError,galsim.AngleUnit, 1, 3)
128128
assert_raises(TypeError,galsim.Angle, 3.4)
129129
assert_raises(TypeError,galsim.Angle, theta1, galsim.degrees)
130-
assert_raises((ValueError, TypeError), galsim.Angle, 'spam')
130+
assert_raises((ValueError, TypeError), galsim.Angle, 'spam', galsim.degrees)
131131
assert_raises(TypeError,galsim.Angle, 1, 3)
132132

133133

tests/test_draw.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,12 +1576,8 @@ def test_np_fft():
15761576
def round_cast(array, dt):
15771577
# array.astype(dt) doesn't round to the nearest for integer types.
15781578
# This rounds first if dt is integer and then casts.
1579-
if is_jax_galsim():
1580-
# NOTE JAX doesn't round to the nearest int when drawing
1581-
pass
1582-
else:
1583-
if dt(0.5) != 0.5:
1584-
array = np.around(array)
1579+
if dt(0.5) != 0.5:
1580+
array = np.around(array)
15851581
return array.astype(dt)
15861582

15871583
@timer

0 commit comments

Comments
 (0)