]> git.ipfire.org Git - thirdparty/glibc.git/commit
plot_strings.py: Replace np.complex with complex
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 21 Oct 2025 23:29:03 +0000 (07:29 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 21 Oct 2025 23:52:54 +0000 (07:52 +0800)
commiteb35513d3ddfc6cad63cd8505bcc545a92695efe
tree084bfdedb31032bbea55f51c8c2f215681065c15
parent2bf2188fae1f3e48d12fdd26f56ff6881fd0b316
plot_strings.py: Replace np.complex with complex

Replace np.complex with complex to fix numpy error:

AttributeError: module 'numpy' has no attribute 'complex'.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
benchtests/scripts/plot_strings.py