Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork11.9k
Open
Description
Describe the issue:
Caught by coverity scan.
Innumpy/ma/mrecords.py, theview() method has identical code in both branches of an if/else statement making the conditional check ineffective:https://github.com/numpy/numpy/blame/3a84feb5731514fd8343543f24b171f581b3a5c6/numpy/ma/mrecords.py#L363-L368
It looks like it was copy pasted fromnumpy/ma/core.py:
Lines 3254 to 3260 in3a84feb
| eliftypeisNone: | |
| try: | |
| ifissubclass(dtype,ndarray): | |
| output=ndarray.view(self,dtype) | |
| dtype=None | |
| else: | |
| output=ndarray.view(self,dtype) |
And it's missing adtype = None
Reproduce the code example:
DescriptionError message:
Python and NumPy Versions:
Python 3.14, numpy 2.3.4
Runtime Environment:
No response
Context for the issue:
No response