Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: delete returns a wrong result (1.26.4) #28824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AnonymousPlayer2000 opened this issue Apr 25, 2025 · 1 comment
Closed

BUG: delete returns a wrong result (1.26.4) #28824

AnonymousPlayer2000 opened this issue Apr 25, 2025 · 1 comment
Labels

Comments

@AnonymousPlayer2000
Copy link

Describe the issue:

delete returns a wrong result when the input is a 0-dim array returned from other function calls.

Reproduce the code example:

import numpy as np
a = np.array(1)
print("a:", a)
print(np.delete(a, 0))
b = np.sum(np.array([1]))
print("b:", a)
print(np.delete(b, 0))

Error message:

Output:

a: 1
[]
b: 1
3841 # multiple runs give different results


NumPy-2.2.2 is ok:

a: 1
[]
b: 1
[]

Python and NumPy Versions:

1.26.4
3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0]

Runtime Environment:

[{'numpy_version': '1.26.4',
'python': '3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0]',
'uname': uname_result(system='Linux', release='6.5.11-linuxkit', version='#1 SMP PREEMPT_DYNAMIC Wed Dec 6 17:14:50 UTC 2023', machine='x86_64')},
{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'],
'found': ['SSSE3',
'SSE41',
'POPCNT',
'SSE42',
'AVX',
'F16C',
'FMA3',
'AVX2',
'AVX512F',
'AVX512CD',
'AVX512_SKX',
'AVX512_CLX',
'AVX512_CNL',
'AVX512_ICL'],
'not_found': ['AVX512_KNL', 'AVX512_KNM']}},
{'architecture': 'SkylakeX',
'filepath': '/opt/conda/envs/py_310_numpy_1264/lib/python3.10/site-packages/numpy.libs/libopenblas64_p-r0-0cf96a72.3.23.dev.so',
'internal_api': 'openblas',
'num_threads': 8,
'prefix': 'libopenblas',
'threading_layer': 'pthreads',
'user_api': 'blas',
'version': '0.3.23.dev'}]

Context for the issue:

No response

@ngoldbaum
Copy link
Member

We don't plan on releasing any future NumPy 1.x versions and this isn't an issue on main, so I'm going to close this.

@ngoldbaum ngoldbaum closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants