Remove FunctionSpace and Discretization#1459
Conversation
|
Checking updated PR...
Comment last updated at 2020-03-31 13:29:10 UTC |
|
Maybe it would already now be good to have some input. From the point of view of functionality, this PR is complete. A big part of it is just moving code around and wiring it up again, so I don't think it's that much to review after all. |
b608ad5 to
a090094
Compare
|
All tests are fixed now. I haven't had the opportunity to check ASTRA CUDA yet, but there were no changes, so it should work. Will look at it soon. Anyway, now the PR is definitely ripe for review. |
|
I'll also look into the PEP8 issues. |
c4b4592 to
fc49909
Compare
|
Any chance to get a review on this PR? I know it looks horribly large from the numbers, but a lot is due to movement of code. When classes go away that were contained in their own modules, it's unavoidable that their functionality move to other files. Thus you get these inflated numbers. If it helps, I can write a small summary of how things used to be wired up and what it looks like now, so it becomes easier to digest and review. |
|
I'll also rebase and get rid of the PEP8 warnings. |
|
Please try to fix the conflicts etc, then I can review this later (although perhaps not this week, it's chaos). |
fc49909 to
d7b476a
Compare
f4ff6f5 to
4d7e59d
Compare
86fc68e to
b017445
Compare
- Fix signatures/docstrings: explicit function parameters should be mentioned under "Parameters" in the docstring, and implicit ones in `kwargs` should be under "Other Parameters". - Fix issue in `ResizingOperator.adjoint`, where `pad_mode` is looked up wrongly. - Fix missing parameters in error string formatting - Implement missing abstract methods `default_dtype` and `available_dtypes` in `DiscreteLp` - Use previously ignored `dtype` parameter in test of `ResizingOperator` - Correctly handle failure in entry part of context managers - Fix bad test for ValueError with wrong argument - Remove some unused variables - Rename functions for mapping PyFFTW flags to ODL convention and back - Simplify boolean expressions - Remove unused `with_metaclass` function - Correct spelling errors
- Rename DiscreteLp and DiscreteLpElement to DiscretizedSpace and DiscretizedSpaceElement - Rename make_func_for_sampling to sampling_function - Infer output shape of vector-valued functions from array shape - Shorten About ODL intro - Inline confusing _all_interp_equal function - Inline getargspec - Rename none_context to nullcontext
|
All comments addressed and rebased on master. Unless there are complaints (by a reviewer or by CI) I'll merge later today. |
|
One last thing I did was to rename the |
|
Very well done on getting this in Holger! |
|
And thanks to Axel for reviewing! |
Rough Overview:
DiscretizationandDiscretizationElementare gone, functionality has been moved ontoDiscreteLpandDiscreteLpElementFunctionSpaceandFunctionSpaceElementare gone, functionality for vectorization and evaluation has been broken into a bunch of functions that live inodl.discr.discr_utils.For instance,
FunctionSpace.element()created a wrapper that unified the interface of functions with and withoutoutargument. This is done in the functionmake_func_for_sampling.Support for non-vectorized functions in
DiscreteLp.element()is removed.Rationale: Why did we ever support this?
Some parts of
discretization.py(now gone) are inlined inlp_discr.py, which makes it appear as if it had changed a lot. It hasn't.discr_sequence_spaceis gone.Rationale: lack of usefulness.
done in API: move 'interp' out of spaces #1520FunctionSpaceMappingclasses have simply been turned into functions and moved over to thediscr_utilsmoduledone in API: move 'interp' out of spaces #1520interpis no longer a property of the space but up to each operator (which I consider to be the better approach)Closes #1457