We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a812324 commit 2ccb387Copy full SHA for 2ccb387
galsim/image.py
@@ -1789,7 +1789,10 @@ def __pow__(self, other):
1789
def __ipow__(self, other):
1790
if not isinstance(other, int) and not isinstance(other, float):
1791
raise TypeError("Can only raise an image to a float or int power!")
1792
- self.array[:,:] **= other
+ if not self.isinteger or isinstance(other, int):
1793
+ self.array[:,:] **= other
1794
+ else:
1795
+ self.array[:,:] = self._safe_cast(self.array ** other)
1796
return self
1797
1798
def __neg__(self):
0 commit comments