Skip to content

Commit 379a881

Browse files
committed
Fix uncertainty.Distribution for change in Quantity
1 parent a9816ad commit 379a881

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎astropy/uncertainty/core.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ def view(self, dtype=None, type=None):
281281
else:
282282
raise ValueError('Cannot set just dtype for a Distribution.')
283283

284+
if issubclass(type, Distribution):
285+
return super().view(type)
286+
284287
result = self.distribution.view(dtype, type)
285288
return Distribution(result)
286289

0 commit comments

Comments
 (0)