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

DONTMERGE: improve repr by a lot #1276

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
.spyproject/
.spyderproject
.spyderworkspace
.spyproject/

# PyCharm project files
.idea
Expand Down
12 changes: 6 additions & 6 deletions doc/gitwash_dumper.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
''' Checkout gitwash repo into directory and do search replace on name '''

from __future__ import (absolute_import, division, print_function)
from __future__ import absolute_import, division, print_function

import fnmatch
import glob
import os
from os.path import join as pjoin
import re
import shutil
import sys
import re
import glob
import fnmatch
import tempfile
from subprocess import call
from optparse import OptionParser
from os.path import join as pjoin
from subprocess import call

verbose = False

Expand Down
8 changes: 5 additions & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
# obtain one at https://mozilla.org/MPL/2.0/.

from __future__ import print_function
from distutils.version import StrictVersion
import sphinx

import glob
import os
import sphinx_rtd_theme
import sys
from distutils.version import StrictVersion

import sphinx
import sphinx_rtd_theme

# --- General configuration --- #

Expand Down
5 changes: 3 additions & 2 deletions doc/source/generate_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
# obtain one at https://mozilla.org/MPL/2.0/.

from __future__ import print_function
import inspect

import importlib
import odl
import inspect

import odl

__all__ = ('make_interface',)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Source code for the getting started example."""

import odl
import scipy
import scipy.signal

import odl


class Convolution(odl.Operator):
"""Operator calculating the convolution of a kernel with a function.
Expand Down
1 change: 1 addition & 0 deletions doc/source/guide/code/functional_indepth_example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Example of how to implement and use functionals."""

from __future__ import division, print_function

import odl


Expand Down
2 changes: 1 addition & 1 deletion examples/deform/linearized_fixed_displacement.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"""

import numpy as np
import odl

import odl

# --- Create template and displacement field --- #

Expand Down
2 changes: 1 addition & 1 deletion examples/deform/linearized_fixed_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"""

import numpy as np
import odl

import odl

# --- Create template and displacement field --- #

Expand Down
3 changes: 2 additions & 1 deletion examples/operator/convolution_operator.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Create a convolution operator by wrapping a library."""

import odl
import scipy
import scipy.signal

import odl


class Convolution(odl.Operator):
"""Operator calculating the convolution of a kernel with a function.
Expand Down
1 change: 1 addition & 0 deletions examples/solvers/admm_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"""

import numpy as np

import odl

# --- Set up the forward operator (ray transform) --- #
Expand Down
2 changes: 1 addition & 1 deletion examples/solvers/conjugate_gradient_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"""

import numpy as np
import odl

import odl

# --- Set up the forward operator (ray transform) --- #

Expand Down
3 changes: 2 additions & 1 deletion examples/solvers/deconvolution_1d.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""Example of a deconvolution problem with different solvers (CPU)."""

import numpy as np
import matplotlib.pyplot as plt
import numpy as np
import scipy.signal

import odl


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import numpy as np
import scipy
import odl

import odl

# Read test image:
# convert integer values to float, and rotate to get the image upright
Expand Down
1 change: 1 addition & 0 deletions examples/solvers/douglas_rachford_pd_heron.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import matplotlib.pyplot as plt
import numpy as np

import odl

# Create the solution space
Expand Down
1 change: 1 addition & 0 deletions examples/solvers/douglas_rachford_pd_mri.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""

import numpy as np

import odl

# Parameters
Expand Down
1 change: 1 addition & 0 deletions examples/solvers/douglas_rachford_pd_tomography_tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"""

import numpy as np

import odl

# Parameters
Expand Down
1 change: 1 addition & 0 deletions examples/solvers/find_optimal_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import numpy as np
import scipy

import odl


Expand Down
1 change: 1 addition & 0 deletions examples/solvers/forward_backward_pd_denoising.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import numpy as np
import scipy.misc

import odl

# Load image
Expand Down
1 change: 1 addition & 0 deletions examples/solvers/functional_basic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""

import numpy as np

import odl


Expand Down
1 change: 1 addition & 0 deletions examples/solvers/functional_basic_example_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""

import numpy as np

import odl

# Create a space with dimensiona n=10.
Expand Down
1 change: 0 additions & 1 deletion examples/solvers/kaczmarz_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import odl


# --- Set up the forward operator (ray transform) --- #


Expand Down
2 changes: 1 addition & 1 deletion examples/solvers/lbfgs_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"""

import numpy as np
import odl

import odl

# --- Set up the forward operator (ray transform) --- #

Expand Down
2 changes: 1 addition & 1 deletion examples/solvers/lbfgs_tomography_tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"""

import numpy as np
import odl

import odl

# --- Set up the forward operator (ray transform) --- #

Expand Down
2 changes: 1 addition & 1 deletion examples/solvers/nuclear_norm_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@


import numpy as np
import odl

import odl

# --- Set up the forward operator (ray transform) --- #

Expand Down
1 change: 1 addition & 0 deletions examples/solvers/pdhg_deconvolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"""

import numpy as np

import odl

# Discretization parameters
Expand Down
1 change: 1 addition & 0 deletions examples/solvers/pdhg_denoising.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import numpy as np
import scipy.misc

import odl

# Read test image: use only every second pixel, convert integer to float,
Expand Down
3 changes: 2 additions & 1 deletion examples/solvers/pdhg_denoising_L1_HuberTV.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
https://odlgroup.github.io/odl/guide/pdhg_guide.html in the ODL documentation.
"""

import matplotlib.pyplot as plt
import numpy as np

import odl
import matplotlib.pyplot as plt

# Define ground truth, space and noisy data
shape = [100, 100]
Expand Down
3 changes: 2 additions & 1 deletion examples/solvers/pdhg_denoising_L2_HuberTV.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
https://odlgroup.github.io/odl/guide/pdhg_guide.html in the ODL documentation.
"""

import matplotlib.pyplot as plt
import numpy as np
import scipy

import odl
import matplotlib.pyplot as plt

# Define ground truth, space and noisy data
image = np.rot90(scipy.misc.ascent()[::2, ::2].astype('float'), 3)
Expand Down
3 changes: 2 additions & 1 deletion examples/solvers/pdhg_denoising_ROF_algorithm_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
https://odlgroup.github.io/odl/guide/pdhg_guide.html in the ODL documentation.
"""

import matplotlib.pyplot as plt
import numpy as np
import scipy

import odl
import matplotlib.pyplot as plt

# --- define setting --- #

Expand Down
1 change: 1 addition & 0 deletions examples/solvers/pdhg_denoising_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import numpy as np
import scipy.misc

import odl

# Read test image: use only every second pixel, convert integer to float,
Expand Down
1 change: 1 addition & 0 deletions examples/solvers/pdhg_denoising_tgv.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"""

import numpy as np

import odl

# --- Set up the forward operator (identity) --- #
Expand Down
1 change: 1 addition & 0 deletions examples/solvers/pdhg_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"""

import numpy as np

import odl

# --- Set up the forward operator (ray transform) --- #
Expand Down
1 change: 1 addition & 0 deletions examples/solvers/pdhg_tomography_tgv.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"""

import numpy as np

import odl

# --- Set up the forward operator (ray transform) --- #
Expand Down
1 change: 0 additions & 1 deletion examples/solvers/proximal_gradient_denoising.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import odl


# --- Set up problem definition --- #


Expand Down
2 changes: 1 addition & 1 deletion examples/solvers/proximal_gradient_wavelet_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
The proximal gradient solvers are also known as ISTA and FISTA.
"""

import odl
import numpy as np

import odl

# --- Set up problem definition --- #

Expand Down
1 change: 1 addition & 0 deletions examples/solvers/proximal_lang_poisson.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""

import numpy as np

import odl
import proximal

Expand Down
2 changes: 1 addition & 1 deletion examples/solvers/proximal_lang_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"""

import numpy as np

import odl
import proximal


# --- Set up the forward operator (ray transform) --- #


Expand Down
3 changes: 2 additions & 1 deletion examples/solvers/rosenbrock_minimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
This example shows how this can be done using a variety of solution methods.
"""

import odl
from matplotlib import pyplot as plt

import odl

# Create the solution space
space = odl.rn(2)

Expand Down
1 change: 1 addition & 0 deletions examples/solvers/scipy_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import numpy as np
import scipy.sparse.linalg as sl

import odl

# Create discrete space, a square from [-1, 1] x [-1, 1] with (11 x 11) points
Expand Down
Loading