Skip to content

Commit

Permalink
Improve Python 3 compatibility
Browse files Browse the repository at this point in the history
Mostly adding relative imports.
rayosborn committed May 11, 2016
1 parent 04432a6 commit 2d8f5d2
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/nxpeaks/__init__.py
Original file line number Diff line number Diff line change
@@ -5,14 +5,15 @@
#
# The full license is in the file COPYING, distributed with this software.
#-----------------------------------------------------------------------------
from __future__ import absolute_import

__package_name__ = u'NXpeaks'
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions

__documentation_author__ = u'Ray Osborn'
__documentation_copyright__ = u'2013-15, Ray Osborn'
__documentation_copyright__ = u'2013-16, Ray Osborn'

__license__ = u'BSD'
__author_name__ = u'NeXpy Development Team'
3 changes: 2 additions & 1 deletion src/nxpeaks/blobcorrector.py
Original file line number Diff line number Diff line change
@@ -28,7 +28,8 @@
To think about doing - valid regions? What if someone uses a 1K spline
file for a 2K image etc?
"""
import logging, numpy, math
from __future__ import absolute_import
from . import logging, numpy, math
from scipy.interpolate import bisplev

def readfit2dfloats(filep, nfl):
7 changes: 5 additions & 2 deletions src/nxpeaks/nxrefine.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from __future__ import absolute_import

import numpy as np
import os
import random
from scipy.optimize import minimize

from nexusformat.nexus import *
from nxpeaks.unitcell import unitcell
from nxpeaks import closest
from .unitcell import unitcell
from . import closest


degrees = 180.0 / np.pi

0 comments on commit 2d8f5d2

Please sign in to comment.