We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67a8876 commit 009b999Copy full SHA for 009b999
galsim/image.py
@@ -1794,7 +1794,10 @@ def __pow__(self, other):
1794
def __ipow__(self, other):
1795
if not isinstance(other, int) and not isinstance(other, float):
1796
raise TypeError("Can only raise an image to a float or int power!")
1797
- self.array[:,:] **= other
+ if not self.isinteger or isinstance(other, int):
1798
+ self.array[:,:] **= other
1799
+ else:
1800
+ self.array[:,:] = self._safe_cast(self.array ** other)
1801
return self
1802
1803
def __neg__(self):
0 commit comments