diff --git a/geomagio/algorithm/SqDistAlgorithm.py b/geomagio/algorithm/SqDistAlgorithm.py
index faec56ab7453fc6be7a5d7ff96de799598848c39..a3e65e91118acf30bb0331674858f2863cb341d6 100644
--- a/geomagio/algorithm/SqDistAlgorithm.py
+++ b/geomagio/algorithm/SqDistAlgorithm.py
@@ -471,13 +471,13 @@ class SqDistAlgorithm(Algorithm):
 
                 # distribute error correction across range of seasonal
                 # corrections according to weights calculated above
-                s[i + m] = s[i] + gamma * (1 - alpha) * et * weights[nts / 2]
-                s[i + m - nts / 2:i + m] = (s[i + m - nts / 2:i + m] +
+                s[i + m] = s[i] + gamma * (1 - alpha) * et * weights[nts // 2]
+                s[i + m - nts // 2:i + m] = (s[i + m - nts // 2:i + m] +
                                             gamma * (1 - alpha) * et *
-                                            weights[:nts / 2])
-                s[i + 1:i + nts / 2 + 1] = (s[i + 1:i + nts / 2 + 1] +
+                                            weights[:nts // 2])
+                s[i + 1:i + nts // 2 + 1] = (s[i + 1:i + nts // 2 + 1] +
                                             gamma * (1 - alpha) * et *
-                                            weights[nts / 2 + 1:])
+                                            weights[nts // 2 + 1:])
 
                 # update l and b using equation-error formulation
                 l = l + phi * b + alpha * et
diff --git a/geomagio/imfv283/IMFV283Parser.py b/geomagio/imfv283/IMFV283Parser.py
index 1a852f510d7f1541088180e2bb95faad2431e712..3f60941fd405dc001c4dc321f74ac1d8fb9c027d 100644
--- a/geomagio/imfv283/IMFV283Parser.py
+++ b/geomagio/imfv283/IMFV283Parser.py
@@ -334,7 +334,7 @@ class IMFV283Parser(object):
             byte1 = ord(msg[offset + ness_byte])
 
             goes_value1 = (byte3 & 0x3F) + ((byte2 & 0x3) * 0x40)
-            goes_value2 = ((byte2 / 0x4) & 0xF) + ((byte1 & 0xF) * 0x10)
+            goes_value2 = ((byte2 // 0x4) & 0xF) + ((byte1 & 0xF) * 0x10)
 
             # swap the bytes depending on domsat information.
             if domsat['swap_hdr'] and cnt <= 11 or \