Skip to content

von Neumann lecture improvements #478 #533

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

xuanguang-li
Copy link

Key changes

  • Set the max-height of cells to none at the beginning
  • Removed object after class Nuemann
  • Adopted sphinx-proof environments

Question

  • As I used the sphinx-proof, assumptions numbered as "I, II" have been changed to "1, 2". But in the definition of class Neumann, some variables are named as AI and AII. Should I change the names of these variables to A1 and A2? @mmcky

For example,

def __init__(self, A, B):

        self.A, self.B = list(map(self.convert, (A, B)))
        self.m, self.n = self.A.shape

        # Check if (A, B) satisfy the basic assumptions
        assert self.A.shape == self.B.shape, 'The input and output matrices \
              must have the same dimensions!'
        assert (self.A >= 0).all() and (self.B >= 0).all(), 'The input and \
              output matrices must have only non-negative entries!'

        # (1) Check whether Assumption 1 is satisfied:
        if (np.sum(B, 0) <= 0).any():
            self.AI = False
        else:
            self.AI = True

        # (2) Check whether Assumption 2 is satisfied:
        if (np.sum(A, 1) <= 0).any():
            self.AII = False
        else:
            self.AII = True

- Set the max-height of cells to none
- Removed `object` after `class Nuemann`
- Adopted `sphinx-proof` enviornments
Copy link

github-actions bot commented Aug 12, 2025

@github-actions github-actions bot temporarily deployed to pull request August 12, 2025 10:24 Inactive
@github-actions github-actions bot temporarily deployed to pull request August 12, 2025 10:25 Inactive
@mmcky mmcky requested a review from Copilot August 12, 2025 10:30
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the von Neumann lecture by modernizing documentation formatting and fixing minor inconsistencies. The changes primarily focus on adopting sphinx-proof environments for better mathematical presentation and updating code cell configurations.

Key changes:

  • Adoption of sphinx-proof environments for assumptions, definitions, theorems, and proofs
  • Removal of object inheritance from class Neumann (Python 3 style)
  • Addition of CSS styling to remove cell height restrictions

Assumptions:
- AI: every column of B has a positive entry : {AI}
- AII: every row of A has a positive entry : {AII}
Assumptions:// TODO:change {AI} variable into A1?
Copy link
Preview

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

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

The TODO comment should be removed or properly formatted. If this is a genuine TODO, it should be tracked in an issue rather than left in production code.

Suggested change
Assumptions:// TODO:change {AI} variable into A1?
Assumptions:

Copilot uses AI. Check for mistakes.

@@ -372,18 +382,20 @@ an economy.

Two key assumptions restrict economy $(A,B)$:

- **Assumption I:** (every good that is consumed is also produced)
````{prf:assumption} every good that is consumed is also produced)
Copy link
Preview

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

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

There is an extra closing parenthesis in the assumption title. It should be 'every good that is consumed is also produced' without the trailing parenthesis.

Suggested change
````{prf:assumption} every good that is consumed is also produced)
````{prf:assumption} every good that is consumed is also produced

Copilot uses AI. Check for mistakes.

@mmcky mmcky self-requested a review August 12, 2025 11:03
@mmcky
Copy link
Contributor

mmcky commented Aug 12, 2025

Thanks for the PR @xuanguang-li. I will take a look tomorrow.

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