Skip to content

Fix deprecation warnings with numpy 2.5#42437

Open
antonio-rojas wants to merge 1 commit into
sagemath:developfrom
antonio-rojas:numpy-2.5
Open

Fix deprecation warnings with numpy 2.5#42437
antonio-rojas wants to merge 1 commit into
sagemath:developfrom
antonio-rojas:numpy-2.5

Conversation

@antonio-rojas

Copy link
Copy Markdown
Member

Fixes

File "/usr/share/doc/sage/html/en/thematic_tutorials/_sources/numerical_sage/numpy.rst.txt", line 173, in numpy.rst
Failed example:
    n.shape=(5,5)
Expected nothing
Got:
    doctest:warning
      File "<doctest numpy.rst[32]>", line 1, in <module>
        n.shape=(Integer(5),Integer(5))
      File "/usr/lib/python3.14/_py_warnings.py", line 230, in _showwarnmsg
        sw(msg.message, msg.category, msg.filename, msg.lineno,
    :
    DeprecationWarning: Setting the shape on a NumPy array has been deprecated in NumPy 2.5.
    As an alternative, you can create a new view using np.reshape (with copy=False if needed).

@github-actions

Copy link
Copy Markdown

Documentation preview for this PR (built with commit c199975; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants