Index: extra/pylint_numpy.py
===================================================================
--- extra/pylint_numpy.py	(revision 3c56da87f0995bdde77f4183b68e77b81584dde0)
+++ extra/pylint_numpy.py	(revision 63b32bbc85e7dea7a022cf604ac020dee56d7a88)
@@ -8,5 +8,5 @@
     #print("processing",module.name)
     if module.name.startswith('numpy'):
-        if module.name == 'numpy': import numpy
+        if module.name == 'numpy':  import numpy
         elif module.name == 'numpy.random': import numpy.random
 
Index: sasmodels/bumps_model.py
===================================================================
--- sasmodels/bumps_model.py	(revision 750ffa58d4841615a93ccb846e347c34ab7cb9e9)
+++ sasmodels/bumps_model.py	(revision 63b32bbc85e7dea7a022cf604ac020dee56d7a88)
@@ -365,5 +365,5 @@
         if 'theory' not in self._cache:
             if self._fn is None:
-                q_input= self.model.make_input(self._fn_inputs)
+                q_input = self.model.make_input(self._fn_inputs)
                 self._fn = self.model(q_input)
 
Index: sasmodels/kernelcl.py
===================================================================
--- sasmodels/kernelcl.py	(revision 750ffa58d4841615a93ccb846e347c34ab7cb9e9)
+++ sasmodels/kernelcl.py	(revision 63b32bbc85e7dea7a022cf604ac020dee56d7a88)
@@ -93,6 +93,6 @@
     """
     return kernel.get_work_group_info(
-            cl.kernel_work_group_info.PREFERRED_WORK_GROUP_SIZE_MULTIPLE,
-            queue.device)
+        cl.kernel_work_group_info.PREFERRED_WORK_GROUP_SIZE_MULTIPLE,
+        queue.device)
 
 def _stretch_input(vector, dtype, extra=1e-3, boundary=32):
Index: sasmodels/kerneldll.py
===================================================================
--- sasmodels/kerneldll.py	(revision 750ffa58d4841615a93ccb846e347c34ab7cb9e9)
+++ sasmodels/kerneldll.py	(revision 63b32bbc85e7dea7a022cf604ac020dee56d7a88)
@@ -18,5 +18,4 @@
 from .kernelpy import PyInput, PyModel
 
-from .generate import F32, F64
 # Compiler platform details
 if sys.platform == 'darwin':
@@ -199,5 +198,5 @@
 
     def __call__(self, fixed_pars, pd_pars, cutoff):
-        real = np.float32 if self.q_input.dtype == F32 else np.float64
+        real = np.float32 if self.q_input.dtype == generate.F32 else np.float64
 
         nq = c_int(self.q_input.nq)
Index: sasmodels/models/HayterMSAsq.py
===================================================================
--- sasmodels/models/HayterMSAsq.py	(revision ab87a1272f642165d1cc2846daaa1931acf45829)
+++ sasmodels/models/HayterMSAsq.py	(revision 63b32bbc85e7dea7a022cf604ac020dee56d7a88)
@@ -48,5 +48,5 @@
 #  dp[5] = dielectconst();
 
-from numpy import pi, inf
+from numpy import inf
 
 source = ["HayterMSAsq_kernel.c"]
Index: sasmodels/resolution.py
===================================================================
--- sasmodels/resolution.py	(revision 3fdb4b6ed8091311c499a8a69d08fc44f657b865)
+++ sasmodels/resolution.py	(revision 63b32bbc85e7dea7a022cf604ac020dee56d7a88)
@@ -3,5 +3,7 @@
 import numpy as np
 
-def pinhole_resolution(q_calc, q, dq):
+SLIT_SMEAR_POINTS = 500
+
+def pinhole_resolution(q_calc, q, q_width):
     """
     Compute the convolution matrix *W* for pinhole resolution 1-D data.
@@ -15,6 +17,6 @@
     edges = bin_edges(q_calc)
     edges[edges<0.] = 0. # clip edges below zero
-    G = erf( (edges[:,None]-q[None,:]) / (sqrt(2.0)*dq)[None,:] )
-    weights = G[1:,:] - G[:-1,:]
+    G = erf( (edges[:,None] - q[None,:]) / (sqrt(2.0)*q_width)[None,:] )
+    weights = G[1:] - G[:-1]
     weights /= sum(weights, axis=1)
     return weights
@@ -22,91 +24,29 @@
 def slit_resolution(q_calc, q, qx_width, qy_width):
     edges = bin_edges(q_calc) # Note: requires q > 0
-    edges[edges<0.] = 0. # clip edges below zero
+    edges[edges<0.] = 0.0 # clip edges below zero
+    qy_min, qy_max = 0.0, edges[-1]
 
     weights = np.zeros((len(q),len(q_calc)),'d')
-    # Loop for width (;Height is analytical.)
+    # Loop for width (height is analytical).
     # Condition: height >>> width, otherwise, below is not accurate enough.
-    # Smear weight numerical iteration for width >0 when the height (>0) presents.
+    # Smear weight numerical iteration for width>0 when height>0.
     # When width = 0, the numerical iteration will be skipped.
     # The resolution calculation for the height is done by direct integration,
-    # assuming the I(q'=sqrt(q_j^2-(q+shift_w)^2)) is constant within a q' bin, [q_high, q_low].
-    # In general, this weight numerical iteration for width >0 might be a rough approximation,
-    # but it must be good enough when height >>> width.
+    # assuming the I(q'=sqrt(q_j^2-(q+shift_w)^2)) is constant within
+    # a q' bin, [q_high, q_low].
+    # In general, this weight numerical iteration for width>0 might be a rough
+    # approximation, but it must be good enough when height >>> width.
     E_sq = edges**2[:,None]
-    y_pts = 500 if np.any(qy_width>0) else 1
-    for k in range(-y_pts+1,y_pts):
-        qy = q if y_pts == 1 else q + qy_width/(y_pts-1)*k
-        qy = np.clip(qy, 0.0, edges[-1])
+    y_points = SLIT_SMEAR_POINTS if np.any(qy_width>0) else 1
+    qy_step = 0 if y_points == 1 else qy_width/(y_points-1)
+    for k in range(-y_points+1,y_points):
+        qy = np.clip(q + qy_step*k, qy_min, qy_max)
         qx_low = qy
         qx_high = sqrt(qx_low**2 + qx_width**2)
         in_x = (q_calc[:,None]>=qx_low[None,:])*(q_calc[:,None]<=qx_high[None,:])
-        weights += (sqrt(E_sq[1:]-qy[None,:]**2)-sqrt(E_sq[:-1]-qy[None,:]**2))*in_x
+        qy_sq = qy**2[None,:]
+        weights += (sqrt(E_sq[1:]-qy_sq) - sqrt(E_sq[:-1]-qy_sq))*in_x
     weights /= sum(weights, axis=1)
-            # Condition: zero slit smear.
-            if (npts_w == 1 and npts_h == 1):
-                if(q_j == q) :
-                    weights[i,j] = 1.0
-            #Condition:Smear weight integration for width >0 when the height (=0) does not present.
-            #Or height << width.
-            elif (npts_w!=1 and npts_h==1)or(npts_w!=1 and npts_h != 1 and width/height > 100.0):
-                shift_w = width
-                #del_w = width/((double)npts_w-1.0);
-                q_shifted_low = q - shift_w
-                # High limit of the resolution range
-                q_shifted_high = q + shift_w
-                # Go through all the q_js for weighting those points
-                if(q_j >= q_shifted_low and q_j <= q_shifted_high):
-                    # The weighting factor comes,
-                    # Give some weight (delq_bin) for the q_j within the resolution range
-                    # Weight should be same for all qs except
-                    # for the q bin size at j.
-                    # Note that the division by q_0 is only due to the precision problem
-                    # where q_high - q_low gets to very small.
-                    # Later, it will be normalized again.
-                    weights[i,j] += (q_high - q_low)/q_0
-            else:
-                # Loop for width (;Height is analytical.)
-                # Condition: height >>> width, otherwise, below is not accurate enough.
-                # Smear weight numerical iteration for width >0 when the height (>0) presents.
-                # When width = 0, the numerical iteration will be skipped.
-                # The resolution calculation for the height is done by direct integration,
-                # assuming the I(q'=sqrt(q_j^2-(q+shift_w)^2)) is constant within a q' bin, [q_high, q_low].
-                # In general, this weight numerical iteration for width >0 might be a rough approximation,
-                # but it must be good enough when height >>> width.
-                for k in range(-npts_w + 1,npts_w+1):
-                    if(npts_w!=1):
-                        shift_w = width/(npts_w-1.0)*k
-                    # For each q-value, compute the weight of each other q-bin
-                    # in the I(q) array
-                    # Low limit of the resolution range
-                    q_shift = q + shift_w
-                    if (q_shift < 0.0):
-                        q_shift = 0.0
-                    q_shifted_low = q_shift
-                    # High limit of the resolution range
-                    q_shifted_high = sqrt(q_shift * q_shift + shift_h * shift_h)
-
-
-                    # Go through all the q_js for weighting those points
-                    if(q_j >= q_shifted_low and q_j <= q_shifted_high) :
-                        # The weighting factor comes,
-                        # Give some weight (delq_bin) for the q_j within the resolution range
-                        # Weight should be same for all qs except
-                        # for the q bin size at j.
-                        # Note that the division by q_0 is only due to the precision problem
-                        # where q_high - q_low gets to very small.
-                        # Later, it will be normalized again.
-
-                        # The fabs below are not necessary but in case: the weight should never be imaginary.
-                        # At the edge of each sub_width. weight += u(at q_high bin) - u(0), where u(0) = 0,
-                        # and weighted by (2.0* npts_w -1.0)once for each q.
-                        #if (q == q_j) {
-                        if (q_low <= q_shift and q_high > q_shift) :
-                            #if (k==0)
-                            weights[i,j] += (sqrt(abs((q_high)*(q_high)-q_shift * q_shift)))/q_0# * (2.0*double(npts_w)-1.0);
-                        # For the rest of sub_width. weight += u(at q_high bin) - u(at q_low bin)
-                        else:# if (u > 0.0){
-                            weights[i,j] += (sqrt(abs((q_high)*(q_high)- q_shift * q_shift))-sqrt(abs((q_low)*(q_low)- q_shift * q_shift)))/q_0
-
+    return weights
 
 def bin_edges(x):
Index: sasmodels/sasview_model.py
===================================================================
--- sasmodels/sasview_model.py	(revision 3c56da87f0995bdde77f4183b68e77b81584dde0)
+++ sasmodels/sasview_model.py	(revision 63b32bbc85e7dea7a022cf604ac020dee56d7a88)
@@ -154,5 +154,5 @@
                     return
 
-        raise ValueError, "Model does not contain parameter %s" % name
+        raise ValueError("Model does not contain parameter %s" % name)
 
     def getParam(self, name):
@@ -177,5 +177,5 @@
                     return self.params[item]
 
-        raise ValueError, "Model does not contain parameter %s" % name
+        raise ValueError("Model does not contain parameter %s" % name)
 
     def getParamList(self):
