Index: /trunk/psLib/src/dataManip/psStats.c
===================================================================
--- /trunk/psLib/src/dataManip/psStats.c	(revision 1326)
+++ /trunk/psLib/src/dataManip/psStats.c	(revision 1327)
@@ -1600,8 +1600,8 @@
 
     // Allocate the bins, and initialize them to zero.
-    newHist->nums =  psVectorAlloc(n, PS_TYPE_S32);
+    newHist->nums =  psVectorAlloc(n, PS_TYPE_U32);
     newHist->nums->n = newHist->nums->nalloc;
     for (i=0;i<newHist->nums->n;i++) {
-        newHist->nums->data.S32[i] = 0;
+        newHist->nums->data.U32[i] = 0;
     }
 
@@ -1656,8 +1656,8 @@
     // Allocate the bins, and initialize them to zero.  If there are N bounds,
     // then there are N-1 bins.
-    newHist->nums = psVectorAlloc((bounds->n)-1, PS_TYPE_S32);
+    newHist->nums = psVectorAlloc((bounds->n)-1, PS_TYPE_U32);
     newHist->nums->n = newHist->nums->nalloc;
     for (i=0;i<newHist->nums->n;i++) {
-        newHist->nums->data.S32[i] = 0;
+        newHist->nums->data.U32[i] = 0;
     }
 
@@ -1705,4 +1705,15 @@
     if (out == NULL) {
         return(NULL);
+    }
+
+    // Check the specified output histogram for type psF32
+    if (out->bounds->type.type != PS_TYPE_F32) {
+        psAbort(__func__,
+                "Only data type PS_TYPE_F32 for the output.bounds member.");
+    }
+
+    if (out->nums->type.type != PS_TYPE_U32) {
+        psAbort(__func__,
+                "Only data type PS_TYPE_U32 for output.nums member.");
     }
 
Index: /trunk/psLib/src/math/psStats.c
===================================================================
--- /trunk/psLib/src/math/psStats.c	(revision 1326)
+++ /trunk/psLib/src/math/psStats.c	(revision 1327)
@@ -1600,8 +1600,8 @@
 
     // Allocate the bins, and initialize them to zero.
-    newHist->nums =  psVectorAlloc(n, PS_TYPE_S32);
+    newHist->nums =  psVectorAlloc(n, PS_TYPE_U32);
     newHist->nums->n = newHist->nums->nalloc;
     for (i=0;i<newHist->nums->n;i++) {
-        newHist->nums->data.S32[i] = 0;
+        newHist->nums->data.U32[i] = 0;
     }
 
@@ -1656,8 +1656,8 @@
     // Allocate the bins, and initialize them to zero.  If there are N bounds,
     // then there are N-1 bins.
-    newHist->nums = psVectorAlloc((bounds->n)-1, PS_TYPE_S32);
+    newHist->nums = psVectorAlloc((bounds->n)-1, PS_TYPE_U32);
     newHist->nums->n = newHist->nums->nalloc;
     for (i=0;i<newHist->nums->n;i++) {
-        newHist->nums->data.S32[i] = 0;
+        newHist->nums->data.U32[i] = 0;
     }
 
@@ -1705,4 +1705,15 @@
     if (out == NULL) {
         return(NULL);
+    }
+
+    // Check the specified output histogram for type psF32
+    if (out->bounds->type.type != PS_TYPE_F32) {
+        psAbort(__func__,
+                "Only data type PS_TYPE_F32 for the output.bounds member.");
+    }
+
+    if (out->nums->type.type != PS_TYPE_U32) {
+        psAbort(__func__,
+                "Only data type PS_TYPE_U32 for output.nums member.");
     }
 
Index: /trunk/psLib/test/dataManip/tst_psHist00.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psHist00.c	(revision 1326)
+++ /trunk/psLib/test/dataManip/tst_psHist00.c	(revision 1327)
@@ -50,9 +50,9 @@
 
         for (i=0;i<numBins;i++) {
-            if (myHist->nums->data.S32[i] != 0) {
-                printf("ERROR: myHist->nums->data.S32[%d] not initialized to 0.\n", i);
+            if (myHist->nums->data.U32[i] != 0) {
+                printf("ERROR: myHist->nums->data.U32[%d] not initialized to 0.\n", i);
                 testStatus = false;
             }
-            myHist->nums->data.S32[i] = 0;
+            myHist->nums->data.U32[i] = 0;
         }
 
Index: /trunk/psLib/test/dataManip/tst_psHist01.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psHist01.c	(revision 1326)
+++ /trunk/psLib/test/dataManip/tst_psHist01.c	(revision 1327)
@@ -56,9 +56,9 @@
 
         for (i=0;i<numBins;i++) {
-            if (myHist->nums->data.S32[i] != 0) {
-                printf("ERROR: myHist->nums->data.S32[%d] not initialized to 0.\n", i);
+            if (myHist->nums->data.U32[i] != 0) {
+                printf("ERROR: myHist->nums->data.U32[%d] not initialized to 0.\n", i);
                 testStatus = false;
             }
-            myHist->nums->data.S32[i] = 0;
+            myHist->nums->data.U32[i] = 0;
         }
 
Index: /trunk/psLib/test/dataManip/tst_psHist02.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psHist02.c	(revision 1326)
+++ /trunk/psLib/test/dataManip/tst_psHist02.c	(revision 1327)
@@ -66,5 +66,5 @@
 
         myHist = psHistogramAlloc(LOWER, UPPER, numBins);
-        myHist = psHistogramVector(myHist, myData, NULL, 0);
+        myHist = psVectorHistogram(myHist, myData, NULL, 0);
 
         for (i=0;i<numBins;i++) {
@@ -72,5 +72,5 @@
                    myHist->bounds->data.F32[i],
                    myHist->bounds->data.F32[i+1],
-                   myHist->nums->data.S32[i]);
+                   myHist->nums->data.U32[i]);
         }
         psMemCheckCorruption(1);
@@ -91,5 +91,5 @@
 
         myHist = psHistogramAlloc(LOWER, UPPER, numBins);
-        myHist = psHistogramVector(myHist, myData, myMask, 1);
+        myHist = psVectorHistogram(myHist, myData, myMask, 1);
 
         for (i=0;i<numBins;i++) {
@@ -97,5 +97,5 @@
                    myHist->bounds->data.F32[i],
                    myHist->bounds->data.F32[i+1],
-                   myHist->nums->data.S32[i]);
+                   myHist->nums->data.U32[i]);
         }
         psMemCheckCorruption(1);
@@ -112,10 +112,10 @@
     printPositiveTestHeader(stdout,
                             "psStats functions",
-                            "Calling psHistogramVector() with various NULL inputs.");
+                            "Calling psVectorHistogram() with various NULL inputs.");
 
     // Verify the return value is null and program execution doesn't stop,
     // if input parameter myHist is null.
 
-    myHist2 = psHistogramVector(NULL, myData, NULL, 0);
+    myHist2 = psVectorHistogram(NULL, myData, NULL, 0);
     if (myHist2 != NULL) {
         printf("ERROR: myHist2!=NULL\n");
@@ -130,5 +130,5 @@
 
     myHist = psHistogramAlloc(LOWER, UPPER, numBins);
-    myHist = psHistogramVector(myHist, NULL, NULL, 0);
+    myHist = psVectorHistogram(myHist, NULL, NULL, 0);
     if (myHist == NULL) {
         printf("ERROR: myHist==NULL\n");
@@ -147,5 +147,5 @@
     myData->n = myData->nalloc;
     myHist = psHistogramAlloc(LOWER, UPPER, numBins);
-    myHist = psHistogramVector(myHist, NULL, NULL, 0);
+    myHist = psVectorHistogram(myHist, NULL, NULL, 0);
     if (myHist == NULL) {
         printf("ERROR: myHist==NULL\n");
@@ -157,5 +157,5 @@
     printFooter(stdout,
                 "psStats functions",
-                "Calling psHistogramVector() with various NULL inputs.",
+                "Calling psVectorHistogram() with various NULL inputs.",
                 testStatus);
 
