--- arrayfnsmodule.c~	Thu May 10 18:29:29 2001
+++ arrayfnsmodule.c	Sun Nov 18 15:12:51 2001
@@ -116,11 +116,11 @@
 	{
 	    GET_ARR(wts,weight,PyArray_DOUBLE, 1);
 	    weights = (double *) A_DATA (wts) ;
-	    if (A_SIZE (wts) <= numbers [mxi])
-		{SETERR ("histogram: length of weights is <= max (list).");
-		Py_DECREF(lst);
-		Py_DECREF(wts);
-		return NULL;}
+	    if (A_SIZE (wts) != len)
+	      { SETERR ("histogram: length of weights does not match that of list.");
+	      Py_DECREF(lst);
+	      Py_DECREF(wts);
+	      return NULL;}
 	    Py_Try(ans =
 		   (PyArrayObject *) PyArray_FromDims (1, &ans_size, PyArray_DOUBLE));
 	    dans = (double *) A_DATA (ans);
