def check_numeric_type(array):
    """
    Check if an array contains only numeric values. Accepted formats: int64, int32, float64, float32

    Args:
        array: array-like, shape=(n_samples, n_features)

    Returns:
        boolean, True if the array is one of accepted types.
    """

    is_numeric = array.dtype == 'float64' or \
                 array.dtype == 'int64' or \
                 array.dtype == 'float32' or \
                 array.dtype == 'int32'

    if not is_numeric:
        raise TypeError("Error: Array is of type %s but expected a 'float' or 'int' format" % array.dtype)

    return is_numeric