Skip to content

DOC: Add "NumPy for MATLAB users" migration guide - #314

Open
InessaPawson wants to merge 3 commits into
numpy:mainfrom
InessaPawson:matlab
Open

InessaPawson wants to merge 3 commits into
numpy:mainfrom
InessaPawson:matlab

Conversation

@InessaPawson

Copy link
Copy Markdown
Member

Moves the “NumPy for MATLAB users” page from the NumPy user guide into numpy/numpy-tutorials.

Part of the work on addressing numpy/numpy#33233.

A follow-up PR in numpy/numpy will replace the original page with a redirect stub.

@InessaPawson InessaPawson changed the title Matlab DOC: Add "NumPy for MATLAB users" migration guide Nov 7, 2026
MAINT: Remove local virtual environment from PR
Comment thread ignore_testing Resolved
@InessaPawson

Copy link
Copy Markdown
Member Author

@bsipocz I pushed 6f0ca89 to make the Python examples executable and removed the page from ignore_testing to test the page with the CI test suite. Please note that the snippets inside the list-table rows stay static.

Tested locally with jupytext --to notebook, pytest --nbval-lax (3 cells pass), myst start.

@InessaPawson

Copy link
Copy Markdown
Member Author

@bsipocz While porting I noticed several issues in the guide. I’m keeping this PR as a straight migration, will address those in a follow-up.

@melissawm melissawm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @InessaPawson ! Left some optional comments 😄


### Linear algebra equivalents

````{list-table}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be too difficult to test making these tables scrollable? They are ok as they are, but the long paragraphs may be more readable if they have a bit more space on the page. Not sure which solution would be best but I'd love to be able to compare if it's not too much trouble!

Comment on lines +702 to +703
- `:)` Element-wise multiplication is easy: `A*B`.
- `:(` You have to remember that matrix multiplication has its own

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these emoticons don't translate as well anymore and people are more used to emojis, can we replace them?

@rossbar rossbar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from me - AIUI this is essentially just copying over the numpy-for-matlab-users article from the numpy user guide over here.

I also generally agree with @bsipocz that it'd be worthwhile to actually convert the code snippets into something that is actually executable1, but that can be done in follow-up. It makes sense to me to have a single PR that leaves the content as-is and just deals with the move/translation between sites.

Thanks @InessaPawson

Footnotes

  1. the very first column is a good example: info is a numpy fn, so should be np.info, whereas help is a Python fn. ↩

@rossbar

rossbar commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

One final thought - I think adding the "Migration Guide" subheading is fine, but I also wouldn't be opposed to making this a top-level document (i.e. one that shows up on the nav bar). Something else that could be worried about in follow-up!

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants