{"record":{"id":"756e4a158b09b13b","repo":"tracel-ai/burn","slug":"todo-irfft-is-not-supported-for-ndarray","errorCode":null,"errorMessage":"todo!(\"irfft is not supported for ndarray\")","messagePattern":"todo!\\(\"irfft is not supported for ndarray\"\\)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-ndarray/src/ops/module.rs","lineNumber":415,"sourceCode":"    ) -> FloatTensor<Self> {\n        attention_fallback::<Self>(query, key, value, mask, attn_bias, options)\n    }\n\n    fn rfft(\n        _signal: FloatTensor<Self>,\n        _dim: usize,\n        _n: Option<usize>,\n    ) -> (FloatTensor<Self>, FloatTensor<Self>) {\n        todo!(\"rfft is not supported for ndarray\")\n    }\n\n    fn irfft(\n        _spectrum_re: FloatTensor<Self>,\n        _spectrum_im: FloatTensor<Self>,\n        _dim: usize,\n        _n: Option<usize>,\n    ) -> FloatTensor<Self> {\n        todo!(\"irfft is not supported for ndarray\")\n    }\n}\n","sourceCodeStart":397,"sourceCodeEnd":418,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-ndarray/src/ops/module.rs#L397-L418","documentation":"The ndarray backend's irfft (crates/burn-ndarray/src/ops/module.rs:415) is a stub that always panics with todo!(\"irfft is not supported for ndarray\"). Inverse real FFT is not implemented for CPU ndarray.","triggerScenarios":"Calling Tensor::irfft on a tensor whose backend is burn-ndarray, typically to reconstruct a time-domain signal from (re, im) spectra.","commonSituations":"Inverse STFT / waveform reconstruction in audio pipelines running on the CPU ndarray backend.","solutions":["Use a backend that implements irfft (e.g. candle-based backend).","Compute the inverse FFT externally (rustfft) and import the result as a tensor.","Contribute an irfft implementation to burn-ndarray."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// avoid irfft on ndarray backend; use a rustfft-based fallback instead\nlet spectrum = if backend_supports_irfft() { tensor.irfft(dim, n) } else { irfft_via_rustfft(&tensor) };","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not call Tensor::irfft on the ndarray backend.","Wrap inverse FFT in a backend-checked helper with a rustfft fallback.","Verify backend op coverage in CI for models using spectral ops."],"tags":["rust","burn","ndarray","fft","unimplemented"],"backgroundTag":"op-not-implemented-for-backend","analyzedSha":"d16f7ba2ed0d41408189384044cc886fb4c8f957","analyzedAt":"2026-09-05T13:19:14.260Z","contentChangedAt":"2026-09-05T13:19:14.260Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}