Extends stats::fft() to work with mlx objects while delegating to the
standard R implementation for other inputs.
Usage
fft(z, inverse = FALSE, ...)
# Default S3 method
fft(z, inverse = FALSE, ...)
# S3 method for class 'mlx'
fft(z, inverse = FALSE, axis, ...)Arguments
- z
Input to transform. May be a numeric, complex, or mlx object.
- inverse
Logical flag; if
TRUEcompute the inverse transform.- ...
Passed through to the default method.
- axis
Single axis (1-indexed). Supply a positive integer between 1 and the array rank. Use
NULLwhen the helper interprets it as "all axes" (see individual docs).
Value
For mlx inputs, an mlx object containing complex frequency coefficients; otherwise the base R result.