Skip to content

Reverse the BlockVector/MPIBlockVector base class order#3380

Merged
jsiirola merged 1 commit intoPyomo:mainfrom
jsiirola:pynumero-inheritance-order
Oct 8, 2024
Merged

Reverse the BlockVector/MPIBlockVector base class order#3380
jsiirola merged 1 commit intoPyomo:mainfrom
jsiirola:pynumero-inheritance-order

Conversation

@jsiirola
Copy link
Copy Markdown
Member

@jsiirola jsiirola commented Oct 8, 2024

Fixes # .

Summary/Motivation:

This relieves the need to explicitly re-implement methods from BaseBlockVector (and will enable us to overwrite problematic docstrings from numpy).

Changes proposed in this PR:

  • Reverse the base class order for BlockVector, MPIBlockVector so MRO finds our overloads before the ndarray implementations.
  • Delete unneeded method overloads

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

This relieves the need to explicitly re-implement methods from
BaseBlockVector (and will enable us to overwrite problematic docstrings
from numpy)
Copy link
Copy Markdown
Contributor

@mrmundt mrmundt left a comment

Choose a reason for hiding this comment

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

I love this.

@jsiirola jsiirola changed the title Reverse the BlockVector/MPIBlickVector base class order Reverse the BlockVector/MPIBlockVector base class order Oct 8, 2024
@jsiirola jsiirola merged commit ef61460 into Pyomo:main Oct 8, 2024
@jsiirola jsiirola deleted the pynumero-inheritance-order branch October 8, 2024 20:13
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