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
merged 3 commits into from Sep 1, 2020
Merged

Conversation

sdrave
Copy link
Member

@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/basic.py Show resolved Hide resolved
@@ -407,7 +407,7 @@ def pairwise_inner(self, other, product=None):

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

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.

@codecov
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/greedy.py 85.18% <0.00%> (ø)
src/pymor/algorithms/krylov.py 6.89% <0.00%> (ø)
src/pymor/reductors/residual.py 65.00% <0.00%> (+0.66%) ⬆️
src/pymor/algorithms/ei.py 54.14% <50.00%> (ø)
src/pymor/models/iosys.py 45.36% <50.00%> (ø)
src/pymor/vectorarrays/mpi.py 31.67% <57.14%> (ø)
src/pymor/vectorarrays/interface.py 81.85% <82.35%> (+1.42%) ⬆️
src/pymor/algorithms/genericsolvers.py 78.35% <94.11%> (ø)
src/pymor/bindings/fenics.py 82.27% <100.00%> (ø)
src/pymor/bindings/ngsolve.py 85.07% <100.00%> (ø)
... and 6 more

@sdrave
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
Labels
pr:deprecation Deprecates existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants