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

Use absolute import in reconst #999

Closed
sahmed95 opened this Issue Mar 22, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@sahmed95
Contributor

sahmed95 commented Mar 22, 2016

Please refer to the original issue #969. Use absolute import in place of relative for all .py files inside /dipy. Take care not to change .pyx files

/dipy/dipy/reconst/benchmarks/bench_vec_val_sum.py:
   13  from numpy.random import randn
   14  
   15: from ..vec_val_sum import vec_val_vect
   16  
   17  from numpy.testing import measure, dec

/dipy/dipy/reconst/dki.py:
   11  from dipy.reconst.utils import dki_design_matrix as design_matrix
   12  from dipy.utils.six.moves import range
   13: from ..core.onetime import auto_attr
   14: from .base import ReconstModel
   15  from dipy.core.ndindex import ndindex
   16  

/dipy/dipy/reconst/dti.py:
   14  from dipy.utils.arrfuncs import pinv, eigh
   15  from dipy.data import get_sphere
   16: from ..core.gradients import gradient_table
   17: from ..core.geometry import vector_norm
   18: from ..core.sphere import Sphere
   19: from .vec_val_sum import vec_val_vect
   20: from ..core.onetime import auto_attr
   21: from .base import ReconstModel
   22  
   23  

/dipy/dipy/reconst/gqi.py:
    1  """ Classes and functions for generalized q-sampling """
    2  import numpy as np
    3: from .odf import OdfModel, OdfFit, gfa
    4: from .cache import Cache
    5  import warnings
    6: from .multi_voxel import multi_voxel_fit
    7: from .recspeed import local_maxima, remove_similar_vertices
    8  
    9  

/dipy/dipy/reconst/mapmri.py:
    7  from warnings import warn
    8  from dipy.core.gradients import gradient_table
    9: from ..utils.optpkg import optional_package
   10  
   11  cvxopt, have_cvxopt, _ = optional_package("cvxopt")

/dipy/dipy/reconst/multi_voxel.py:
    3  from numpy.lib.stride_tricks import as_strided
    4  
    5: from ..core.ndindex import ndindex
    6: from .quick_squash import quick_squash as _squash
    7: from .base import ReconstFit
    8  
    9  

/dipy/dipy/reconst/odf.py:
    1  from __future__ import division, print_function, absolute_import
    2: from .base import ReconstModel, ReconstFit
    3  import numpy as np
    4  

/dipy/dipy/reconst/shore.py:
    8  from scipy.special import genlaguerre, gamma, hyp2f1
    9  
   10: from .cache import Cache
   11: from .multi_voxel import multi_voxel_fit
   12: from .shm import real_sph_harm
   13: from ..core.geometry import cart2sphere
   14  
   15: from ..utils.optpkg import optional_package
   16  
   17  cvxopt, have_cvxopt, _ = optional_package("cvxopt")

/dipy/dipy/reconst/tests/test_interpolate.py:
    1  from __future__ import division, print_function, absolute_import
    2  
    3: from ...utils.six.moves import xrange
    4  
    5  from nose.tools import assert_equal, assert_raises, assert_true, assert_false
    .
    8  
    9  import numpy as np
   10: from ..interpolate import (NearestNeighborInterpolator, TriLinearInterpolator,
   11                             OutsideImage)
   12  

/dipy/dipy/reconst/tests/test_shore_fitting.py:
    6  from scipy.special import genlaguerre, gamma
    7  
    8: from ...data import get_gtab_taiwan_dsi
    9: from ..shore import ShoreModel
   10: from ...sims.voxel import MultiTensor
   11  
   12  from numpy.testing import (assert_almost_equal,
   ..
   15                             dec)
   16  
   17: from ...utils.optpkg import optional_package
   18  cvxopt, have_cvxopt, _ = optional_package("cvxopt")
   19  

/dipy/dipy/reconst/tests/test_vec_val_vect.py:
    3  from numpy.testing import assert_almost_equal, dec
    4  
    5: from ..vec_val_sum import vec_val_vect
    6  
    7  def make_vecs_vals(shape):
@theaverageguy

This comment has been minimized.

Contributor

theaverageguy commented Mar 22, 2016

Taking this one! :)

theaverageguy added a commit to theaverageguy/dipy that referenced this issue Mar 22, 2016

@arokem arokem closed this in #1260 Jun 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment