Skip to content
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

nm2noll addition #9

Merged
merged 1 commit into from
Jun 14, 2021
Merged

nm2noll addition #9

merged 1 commit into from
Jun 14, 2021

Conversation

Jufevic
Copy link
Contributor

@Jufevic Jufevic commented May 16, 2021

Hello!

Thank you for sharing this code.

Goal

This pull request is just meant to improve code readability. In the rhotab creation part I introduced a function that converts a (n, m) indices pair into a Noll's index k. The explicit definition of such a function makes your code much shorter and clearer, in my opinion.

Following the convention in noll2nm, I made the indices start at 1, in order to keep the code consistent, so that noll2nm(nm2noll(k)) = k for any k >= 1

Old tests

The previous tests and this new test succesfully pass on the following configurations:

  • Python 3.9 on Windows
  • Python 3.8 on Linux in Windows Subsystem for Linux
    I didn't run any tests with Python 2.

New tests

I added one test to assert correctness for this new function up to the 4th radial order. No need to test above the 4th radial order since the ordering only depends on n modulo 4.

Don't hesitate to ask if you have any issue.

… and k index. Added tests for this function.
@jacopoantonello jacopoantonello merged commit 39e5902 into jacopoantonello:master Jun 14, 2021
@jacopoantonello
Copy link
Owner

Thank you. Great PR!

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.

2 participants