Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jax_galsim/angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __repr__(self):
elif self == arcsec:
return "galsim.arcsec"
else:
return "galsim.AngleUnit(%r)" % ensure_hashable(self.value)
return "galsim.AngleUnit(%r)" % (ensure_hashable(self.value),)

def __eq__(self, other):
return isinstance(other, AngleUnit) and jnp.array_equal(self.value, other.value)
Expand Down Expand Up @@ -222,7 +222,7 @@ def __str__(self):
return str(ensure_hashable(self._rad)) + " radians"

def __repr__(self):
return "galsim.Angle(%r, galsim.radians)" % ensure_hashable(self.rad)
return "galsim.Angle(%r, galsim.radians)" % (ensure_hashable(self.rad),)

def __eq__(self, other):
return isinstance(other, Angle) and jnp.array_equal(self.rad, other.rad)
Expand Down
6 changes: 3 additions & 3 deletions jax_galsim/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __str__(self):
ensure_hashable(self.height),
)
if self.flux != 1.0:
s += ", flux=%s" % ensure_hashable(self.flux)
s += ", flux=%s" % (ensure_hashable(self.flux),)
s += ")"
return s

Expand Down Expand Up @@ -146,9 +146,9 @@ def __repr__(self):
)

def __str__(self):
s = "galsim.Pixel(scale=%s" % ensure_hashable(self.scale)
s = "galsim.Pixel(scale=%s" % (ensure_hashable(self.scale),)
if self.flux != 1.0:
s += ", flux=%s" % ensure_hashable(self.flux)
s += ", flux=%s" % (ensure_hashable(self.flux),)
s += ")"
return s

Expand Down
4 changes: 2 additions & 2 deletions jax_galsim/exponential.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def __repr__(self):
)

def __str__(self):
s = "galsim.Exponential(scale_radius=%s" % ensure_hashable(self.scale_radius)
s += ", flux=%s" % ensure_hashable(self.flux)
s = "galsim.Exponential(scale_radius=%s" % (ensure_hashable(self.scale_radius),)
s += ", flux=%s" % (ensure_hashable(self.flux),)
s += ")"
return s

Expand Down
4 changes: 2 additions & 2 deletions jax_galsim/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def __repr__(self):
)

def __str__(self):
s = "galsim.Gaussian(sigma=%s" % ensure_hashable(self.sigma)
s += ", flux=%s" % ensure_hashable(self.flux)
s = "galsim.Gaussian(sigma=%s" % (ensure_hashable(self.sigma),)
s += ", flux=%s" % (ensure_hashable(self.flux),)
s += ")"
return s

Expand Down
4 changes: 2 additions & 2 deletions jax_galsim/moffat.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ def __str__(self):
ensure_hashable(self.scale_radius),
)
if self.trunc != 0.0:
s += ", trunc=%s" % ensure_hashable(self.trunc)
s += ", trunc=%s" % (ensure_hashable(self.trunc),)
if self.flux != 1.0:
s += ", flux=%s" % ensure_hashable(self.flux)
s += ", flux=%s" % (ensure_hashable(self.flux),)
s += ")"
return s

Expand Down
2 changes: 1 addition & 1 deletion jax_galsim/noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def __repr__(self):
)

def __str__(self):
return "galsim.GaussianNoise(sigma=%s)" % (ensure_hashable(self.sigma))
return "galsim.GaussianNoise(sigma=%s)" % (ensure_hashable(self.sigma),)

def tree_flatten(self):
"""This function flattens the GaussianNoise into a list of children
Expand Down
2 changes: 1 addition & 1 deletion jax_galsim/spergel.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def __str__(self):
ensure_hashable(self.half_light_radius),
)
if self.flux != 1.0:
s += ", flux=%s" % ensure_hashable(self.flux)
s += ", flux=%s" % (ensure_hashable(self.flux),)
s += ")"
return s

Expand Down
2 changes: 1 addition & 1 deletion jax_galsim/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def __str__(self):
ensure_hashable(self._offset.y),
)
if self._flux_ratio != 1.0:
s += " * %s" % ensure_hashable(self._flux_ratio)
s += " * %s" % (ensure_hashable(self._flux_ratio),)
return s

@property
Expand Down
2 changes: 1 addition & 1 deletion jax_galsim/wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ def __eq__(self, other):
)

def __repr__(self):
return "galsim.PixelScale(%r)" % ensure_hashable(self.scale)
return "galsim.PixelScale(%r)" % (ensure_hashable(self.scale),)

def __hash__(self):
return hash(repr(self))
Expand Down
Loading