def checkallinstance(array, elementtype):
    """
    Test whether all elements of the array are of the specified elementtype
    :param array: model weights
    :type  array: `numpy.ndarray`
    :param elementtype: name of type
    :type elementtype: `type`
    :return: result of test
    :rtype: `boolean`
    """

    for i in array:
        if not isinstance(i, elementtype):
            return False
    return True