import math


def prime_divisors(n): 
    """
    Returns all prime divisors of a number

    Parameters
    ----------
    n : int
        denotes the positive integer of which prime divisors needs to be find out
    return : array
        returns an array of integers denoting prime divisors of n

    """
    arr = []  
    if(n<2):
        return arr

    while n % 2 == 0: 
        arr.append(2) 
        n = n / 2

    for i in range(3,int(math.sqrt(n))+1,2):  
        while n % i== 0: 
            arr.append(int(i))
            n = n / i

    if n > 2: 
        arr.append(int(n))

    if(len(arr) == 1):
        return arr
    else:
        temp_arr = []
        temp_arr.append(arr[0])
        for i in range(1,len(arr)):
            if(arr[i] != arr[i-1]):
                temp_arr.append(arr[i])
        return temp_arr