def _createShapelet(self,coeff):
        """
        returns a shapelet array out of the coefficients *a, up to order l

        :param num_l: order of shapelets
        :type num_l: int.
        :param coeff: shapelet coefficients
        :type coeff: floats
        :returns:  complex array
        :raises: AttributeError, KeyError
        """
        n_coeffs = len(coeff)
        num_l = self._get_num_l(n_coeffs)
        shapelets=np.zeros((num_l+1,num_l+1),'complex')
        nl=0
        k=0
        i=0
        while i < len(coeff):
            if i%2==0:
                shapelets[nl][k]+=coeff[i]/2.
                shapelets[k][nl]+=coeff[i]/2.
                if k==nl:
                    nl+=1
                    k=0
                    i+=1
                    continue
                else:
                    k+=1
                    i+=1
                    continue
            else:
                shapelets[nl][k] += 1j*coeff[i]/2.
                shapelets[k][nl] -= 1j*coeff[i]/2.
                i+=1
        return shapelets