+
    i.                     z    ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht  ! R R]4      t ! R	 R
]4      tR# )    )_sympify)
MatrixExpr)I)S)exp)sqrtc                   f   a a ] tR t^	t oRtV 3R lt]! R 4      t]! R 4      tR t	R t
RtVtV ;t# )DFTa  
Returns a discrete Fourier transform matrix. The matrix is scaled
with :math:`\frac{1}{\sqrt{n}}` so that it is unitary.

Parameters
==========

n : integer or Symbol
    Size of the transform.

Examples
========

>>> from sympy.abc import n
>>> from sympy.matrices.expressions.fourier import DFT
>>> DFT(3)
DFT(3)
>>> DFT(3).as_explicit()
Matrix([
[sqrt(3)/3,                sqrt(3)/3,                sqrt(3)/3],
[sqrt(3)/3, sqrt(3)*exp(-2*I*pi/3)/3,  sqrt(3)*exp(2*I*pi/3)/3],
[sqrt(3)/3,  sqrt(3)*exp(2*I*pi/3)/3, sqrt(3)*exp(-2*I*pi/3)/3]])
>>> DFT(n).shape
(n, n)

References
==========

.. [1] https://en.wikipedia.org/wiki/DFT_matrix

c                ^   < \        V4      pV P                  V4       \        SV `  W4      pV# N)r   
_check_dimsuper__new__)clsnobj	__class__s   && ڂ/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/matrices/expressions/fourier.pyr   DFT.__new__*   s+    QKqgoc%
    c                (    V P                   ^ ,          # )r   )argsselfs   &r   <lambda>DFT.<lambda>1   s    diilr   c                2    V P                   V P                   3# r   )r   r   s   &r   r   r   2   s    466466"2r   c                    \        R\        P                  ,          \        ,          V P                  ,          4      pWAV,          ,          \        V P                  4      ,          #    r   r   Pir   r   r   r   ijkwargsws   &&&, r   _entry
DFT._entry4   s:    144	$&& !Q3x$tvv,&&r   c                ,    \        V P                  4      # r   )IDFTr   r   s   &r   _eval_inverseDFT._eval_inverse8   s    DFF|r    )__name__
__module____qualname____firstlineno____doc__r   propertyr   shaper)   r-   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r   r
   r
   	   s7     @ 	*+A23E' r   r
   c                   0   a  ] tR t^<t o RtR tR tRtV tR# )r,   a^  
Returns an inverse discrete Fourier transform matrix. The matrix is scaled
with :math:`\frac{1}{\sqrt{n}}` so that it is unitary.

Parameters
==========

n : integer or Symbol
    Size of the transform

Examples
========

>>> from sympy.matrices.expressions.fourier import DFT, IDFT
>>> IDFT(3)
IDFT(3)
>>> IDFT(4)*DFT(4)
I

See Also
========

DFT

c                    \        R\        P                  ,          \        ,          V P                  ,          4      pWA) V,          ,          \        V P                  4      ,          # r   r"   r$   s   &&&, r   r)   IDFT._entryV   s<    144	$&& !2a4y4<''r   c                ,    \        V P                  4      # r   )r
   r   r   s   &r   r-   IDFT._eval_inverseZ   s    466{r   r/   N)	r0   r1   r2   r3   r4   r)   r-   r7   r8   )r:   s   @r   r,   r,   <   s     2( r   r,   N)sympy.core.sympifyr   sympy.matrices.expressionsr   sympy.core.numbersr   sympy.core.singletonr   &sympy.functions.elementary.exponentialr   (sympy.functions.elementary.miscellaneousr   r
   r,   r/   r   r   <module>rF      s0    ' 1   " 6 90* 0f3 r   