Skip to content
This repository has been archived by the owner on Feb 9, 2018. It is now read-only.

Commit

Permalink
Merge pull request #2 from DanRyanIrish/py3-install
Browse files Browse the repository at this point in the history
Make cube install Python 3 compatible.
  • Loading branch information
DanRyanIrish authored Jun 2, 2017
2 parents 7f1bb38 + d64bb82 commit a87b582
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 5 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@

# Get configuration information from setup.cfg
from distutils import config
conf = config.ConfigParser()
try:
from ConfigParser import ConfigParser
except ImportError:
from configparser import ConfigParser
conf = ConfigParser()
conf.read([os.path.join(os.path.dirname(__file__), '..', 'setup.cfg')])
setup_cfg = dict(conf.items('metadata'))

Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@

# Get some values from the setup.cfg
from distutils import config
conf = config.ConfigParser()
try:
from ConfigParser import ConfigParser
except ImportError:
from configparser import ConfigParser
conf = ConfigParser()
conf.read(['setup.cfg'])
metadata = dict(conf.items('metadata'))

Expand Down
7 changes: 3 additions & 4 deletions sunpycube/spectra/spectrogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import datetime

from random import randint
from itertools import izip
from copy import copy
from math import floor

Expand Down Expand Up @@ -722,7 +721,7 @@ def interpolate(self, frequency):
freq_axis[0] >= frequency >= self_freq_axis[-1]
"""
lfreq, lvalue = None, None
for freq, value in izip(self.freq_axis, self.data[:, :]):
for freq, value in zip(self.freq_axis, self.data[:, :]):
if freq < frequency:
break
lfreq, lvalue = freq, value
Expand Down Expand Up @@ -764,7 +763,7 @@ def linearize_freqs(self, delta_freq=None):
fillto = np.abs(fillto)
fillfrom = np.abs(fillfrom)

for row, from_, to_ in izip(self, fillfrom, fillto):
for row, from_, to_ in zip(self, fillfrom, fillto):
new[from_: to_] = row

vrs = self._get_params()
Expand Down Expand Up @@ -997,7 +996,7 @@ def join_many(cls, specs, mk_arr=None, nonlinear=False,
# Amount of pixels left out due to non-linearity. Needs to be
# considered for correct time axes.
sd = 0
for x, elem in izip(xs, specs):
for x, elem in zip(xs, specs):
diff = x - elem.shape[1]
e_time_axis = elem.time_axis

Expand Down

0 comments on commit a87b582

Please sign in to comment.