Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implementation of dpnp.fft.rfft2, dpnp.fft.irfft2, dpnp.fft.rfftn, dpnp.fft.irfftn #1982

Merged
merged 11 commits into from
Aug 19, 2024
13 changes: 7 additions & 6 deletions dpnp/backend/extensions/fft/out_of_place.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ std::pair<sycl::event, sycl::event>
if (in_nd > 1) {
for (int i = 0; i < in_nd - 1; ++i) {
if (in_shape[i] != out_shape[i]) {
throw py::value_error("The shape of the input and output "
"arrays must be the same.");
throw py::value_error("The shape of the output array is not "
"correct for the given input array.");
}
in_size *= in_shape[i];
}
Expand All @@ -105,17 +105,18 @@ std::pair<sycl::event, sycl::event>
// r2c FFT
N = m / 2 + 1; // integer divide
if (n != N) {
throw py::value_error("The shape of the output array is not "
"correct for real to complex transform.");
throw py::value_error(
"The shape of the output array is not correct for the given "
"input array in real to complex FFT transform.");
}
}
else {
// c2c and c2r FFT. For c2r FFT, input is zero-padded in python side to
// have the same size as output before calling this function
N = m;
if (n != N) {
throw py::value_error("The shape of the input array must be "
"the same as the shape of the output array.");
throw py::value_error("The shape of the output array is not "
"correct for the given input array.");
}
}

Expand Down
Loading
Loading