Single category cannot be executed
#### Description

Single category cannot be executed

#### Steps/Code to Reproduce

```
from pycm import ConfusionMatrix
y_actu = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
y_pred = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
cm = ConfusionMatrix(y_actu, y_pred)
print(cm)
```

#### Expected Behavior

Show that all actual categories match the predicted category.

#### Actual Behavior

```
144 y_actu = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
      145 y_pred = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
----> 146 cm = ConfusionMatrix(y_actu, y_pred)
      147 print(cm)

~\AppData\Roaming\Python\Python36\site-packages\pycm\pycm_obj.py in __init__(self, actual_vector, predict_vector, matrix, digit, threshold, file, sample_weight, transpose)
     93                 self, actual_vector, predict_vector, threshold, sample_weight)
     94      #   if len(matrix_param[0]) < 2:
---> 95      #        raise pycmVectorError(CLASS_NUMBER_ERROR)
     96 
     97         __obj_assign_handler__(self, matrix_param)

pycmVectorError: Number of the classes is lower than 2
```

#### Operating System

Windows 10

#### Python Version

Python 3.6.8

#### PyCM Version (Use : `pycm.__version__`)

2.5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c2ddbf..0c374a4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+### Changed
+- Single class bug fixed
+- `CLASS_NUMBER_ERROR` error type changed to `pycmMatrixError`
 ## [2.7] - 2020-05-11
 ### Added
 - `average` method
diff --git a/Test/error_test.py b/Test/error_test.py
index 05c3ff6..616bc51 100644
--- a/Test/error_test.py
+++ b/Test/error_test.py
@@ -31,7 +31,7 @@ pycm.pycm_obj.pycmMatrixError: Type of the input matrix classes is assumed  be t
 >>> cm_5=ConfusionMatrix(matrix={1:{1:2}})
 Traceback (most recent call last):
         ...
-pycm.pycm_obj.pycmVectorError: Number of the classes is lower than 2
+pycm.pycm_obj.pycmMatrixError: Number of the classes is lower than 2
 >>> y_actu = [2, 0, 2, 2, 0, 1, 1, 2, 2, 0, 1, 2]
 >>> y_pred = [0, 0, 2, 1, 0, 2, 1, 0, 2, 0, 2, 2]
 >>> cm = ConfusionMatrix(y_actu,y_pred)
diff --git a/Test/overall_test.py b/Test/overall_test.py
index 80666f2..35fe2be 100644
--- a/Test/overall_test.py
+++ b/Test/overall_test.py
@@ -1318,4 +1318,60 @@ Actual
 5         0.0       0.0       1.0       0.0
 <BLANKLINE>
 <BLANKLINE>
+>>> y_actu = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+>>> y_pred = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+>>> cm = ConfusionMatrix(y_actu, y_pred)
+>>> cm.print_matrix()
+Predict       1             ~other~
+Actual
+1             10            0
+<BLANKLINE>
+~other~       0             0
+<BLANKLINE>
+<BLANKLINE>
+>>> cm.stat(overall_param=["Overall ACC"],class_param=["TPR","TNR","ACC","AUC"])
+Overall Statistics :
+<BLANKLINE>
+Overall ACC                                                       1.0
+<BLANKLINE>
+Class Statistics :
+<BLANKLINE>
+Classes                                                           1             ~other~
+ACC(Accuracy)                                                     1.0           1.0
+AUC(Area under the ROC curve)                                     None          None
+TNR(Specificity or true negative rate)                            None          1.0
+TPR(Sensitivity, recall, hit rate, or true positive rate)         1.0           None
+<BLANKLINE>
+>>> cm.classes
+['1', '~other~']
+>>> cm
+pycm.ConfusionMatrix(classes: ['1', '~other~'])
+>>> y_actu = ["1", "1", "1", "1", "1", "1", "1", "1", "1", "1"]
+>>> y_pred = ["1", "1", "1", "1", "1", "1", "1", "1", "1", "1"]
+>>> cm = ConfusionMatrix(y_actu, y_pred)
+>>> cm.print_matrix()
+Predict       1             ~other~
+Actual
+1             10            0
+<BLANKLINE>
+~other~       0             0
+<BLANKLINE>
+<BLANKLINE>
+>>> cm.stat(overall_param=["Overall ACC"],class_param=["TPR","TNR","ACC","AUC"])
+Overall Statistics :
+<BLANKLINE>
+Overall ACC                                                       1.0
+<BLANKLINE>
+Class Statistics :
+<BLANKLINE>
+Classes                                                           1             ~other~
+ACC(Accuracy)                                                     1.0           1.0
+AUC(Area under the ROC curve)                                     None          None
+TNR(Specificity or true negative rate)                            None          1.0
+TPR(Sensitivity, recall, hit rate, or true positive rate)         1.0           None
+<BLANKLINE>
+>>> cm.classes
+['1', '~other~']
+>>> cm
+pycm.ConfusionMatrix(classes: ['1', '~other~'])
 """
diff --git a/pycm/pycm_obj.py b/pycm/pycm_obj.py
index 85e95ab..27244f9 100644
--- a/pycm/pycm_obj.py
+++ b/pycm/pycm_obj.py
@@ -76,7 +76,7 @@ class ConfusionMatrix():
             matrix_param = __obj_vector_handler__(
                 self, actual_vector, predict_vector, threshold, sample_weight)
         if len(matrix_param[0]) < 2:
-            raise pycmVectorError(CLASS_NUMBER_ERROR)
+            raise pycmMatrixError(CLASS_NUMBER_ERROR)
         __obj_assign_handler__(self, matrix_param)
         __class_stat_init__(self)
         __overall_stat_init__(self)
diff --git a/pycm/pycm_util.py b/pycm/pycm_util.py
index 5f62618..27caa32 100644
--- a/pycm/pycm_util.py
+++ b/pycm/pycm_util.py
@@ -128,7 +128,7 @@ def vector_filter(actual_vector, predict_vector):
     temp.extend(actual_vector)
     temp.extend(predict_vector)
     types = set(map(type, temp))
-    if len(types) > 1:
+    if len(types) > 1 or len(set(temp)) == 1:
         return [list(map(str, actual_vector)), list(map(str, predict_vector))]
     return [actual_vector, predict_vector]
 
@@ -328,6 +328,8 @@ def matrix_params_calc(actual_vector, predict_vector, sample_weight):
     if isinstance(sample_weight, numpy.ndarray):
         sample_weight = sample_weight.tolist()
     classes = set(actual_vector).union(set(predict_vector))
+    if len(classes) == 1:
+        classes.add("~other~")
     classes = sorted(classes)
     map_dict = {k: 0 for k in classes}
     table = {k: map_dict.copy() for k in classes}
['pycm/pycm_obj.py', 'Test/error_test.py', 'pycm/pycm_util.py', 'Test/overall_test.py', 'CHANGELOG.md']