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

Deprecate l2_norm/l2_norm2 in favor of norm/norm2 #1075

merged 3 commits into from Sep 1, 2020


Copy link

@sdrave sdrave commented Aug 31, 2020

Following #1066, the implementations of VectorArray.l2_norm, VectorArray.l2_norm2 are moved to private _norm, _norm2 methods. l2_norm and l2_norm2 are deprecated so that there is only one method to compute the Euclidean norm of a VectorArray. What that means (the Euclidean norm of the dofs of the array) is clarified in the docstring.

Moreover, almost_equal has been simplified by replacing the (unused) norm parameter by the sup_norm parameter.

@sdrave sdrave added the pr:deprecation Deprecates existing functionality label Aug 31, 2020
@sdrave sdrave added this to the 2020.2 milestone Aug 31, 2020
@sdrave sdrave requested review from renefritze and pmli August 31, 2020 07:36
src/pymor/algorithms/ Show resolved Hide resolved
@@ -407,7 +407,7 @@ def pairwise_inner(self, other, product=None):

def pairwise_dot(self, other):
return self.pariwise_inner(other)
return self.pairwise_inner(other)
Copy link

Choose a reason for hiding this comment

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

Seems this was never exercised in tests before, is pairwise_inner now?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. Maybe it was not so wise to remove the test for pairwise_dot. Was too lazy to open a separate PR for this.

Copy link

codecov bot commented Aug 31, 2020

Codecov Report

Merging #1075 into master will increase coverage by 0.03%.
The diff coverage is 79.38%.

Impacted Files Coverage Δ
src/pymor/algorithms/ 85.18% <0.00%> (ø)
src/pymor/algorithms/ 6.89% <0.00%> (ø)
src/pymor/reductors/ 65.00% <0.00%> (+0.66%) ⬆️
src/pymor/algorithms/ 54.14% <50.00%> (ø)
src/pymor/models/ 45.36% <50.00%> (ø)
src/pymor/vectorarrays/ 31.67% <57.14%> (ø)
src/pymor/vectorarrays/ 81.85% <82.35%> (+1.42%) ⬆️
src/pymor/algorithms/ 78.35% <94.11%> (ø)
src/pymor/bindings/ 82.27% <100.00%> (ø)
src/pymor/bindings/ 85.07% <100.00%> (ø)
... and 6 more

Copy link
Member Author

sdrave commented Sep 1, 2020

@HenKlei, @pmli, any further comments? I would like to merge this soon, to prevent merge conflicts.

@sdrave sdrave merged commit ce71737 into master Sep 1, 2020
2 checks passed
@sdrave sdrave deleted the remove_l2_norm branch September 1, 2020 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
pr:deprecation Deprecates existing functionality
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants