Skip to content

Commit

Permalink
Merge pull request #95 from smsaladi/patch-2
Browse files Browse the repository at this point in the history
Cast to int after round
  • Loading branch information
jjhelmus authored May 2, 2019
2 parents 352752d + 534ff29 commit 4ff0428
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nmrglue/analysis/linesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def estimate_scales(spectrum, centers, box_width, scale_axis=0):
"""
shape = spectrum.shape
bcenters = np.round(np.array(centers).astype('int'))
bcenters = np.round(np.array(centers)).astype('int')
scales = []
# loop over the box centers
for bc in bcenters:
Expand Down Expand Up @@ -235,7 +235,7 @@ def fit_spectrum(spectrum, lineshapes, params, amps, bounds, ampbounds,
ccenters = [centers[i] for i in cpeaks]

# find the box edges
bcenters = np.round(np.array(ccenters).astype('int'))
bcenters = np.round(np.array(ccenters)).astype('int')
bmin = bcenters - box_width
bmax = bcenters + box_width + 1

Expand Down

0 comments on commit 4ff0428

Please sign in to comment.