Skip to content

Commit 597d17c

Browse files
committed
Merge pull request #48 from Eric89GXL/int-fix
FIX: Explicit int to suppress numpy warning
2 parents 7491470 + 1e87e16 commit 597d17c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

surfer/viz.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,8 @@ def scale_data_colormap(self, fmin, fmid, fmax, transparent):
13451345
n_colors2 = int(n_colors / 2)
13461346

13471347
# Index of fmid in new colorbar
1348-
fmid_idx = np.round(n_colors * ((fmid - fmin) / (fmax - fmin))) - 1
1348+
fmid_idx = int(np.round(n_colors * ((fmid - fmin) / (fmax - fmin)))
1349+
- 1)
13491350

13501351
# Go through channels
13511352
for i in range(4):

0 commit comments

Comments
 (0)