Skip to content

Commit d6baa44

Browse files
committed
update the test suit for dpnp.fft module (#2071)
* update an FFT test * update changelog.md * disable too-many-arguments error for pylint * fix: too-many-positional-arguments * set a larger value for max-positional-arguments instead of disabling it
1 parent 45ba570 commit d6baa44

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
<<<<<<< HEAD
8+
=======
9+
## [0.17.0] - MM/DD/2025
10+
11+
### Added
12+
13+
### Changed
14+
15+
### Fixed
16+
17+
18+
>>>>>>> c3fe479b228 (update the test suit for `dpnp.fft` module (#2071))
719
## [0.16.0] - 09/DD/2024
820

921
This release reaches an important milestone by making offloading fully asynchronous. Calls to `dpnp` submit tasks for execution to DPC++ runtime and return without waiting for execution of these tasks to finish. The sequential semantics a user comes to expect from execution of Python script is preserved though.
@@ -41,7 +53,7 @@ In addition, this release completes implementation of `dpnp.fft` module and adds
4153
* Added implementation of `dpnp.resize` and `dpnp.rot90` functions [#2030](https://github.com/IntelPython/dpnp/pull/2030)
4254
* Added implementation of `dpnp.require` function [#2036](https://github.com/IntelPython/dpnp/pull/2036)
4355

44-
### Change
56+
### Changed
4557

4658
* Extended pre-commit pylint check to `dpnp.fft` module [#1860](https://github.com/IntelPython/dpnp/pull/1860)
4759
* Reworked `vm` vector math backend to reuse `dpctl.tensor` functions around unary and binary functions [#1868](https://github.com/IntelPython/dpnp/pull/1868)
@@ -105,6 +117,7 @@ In addition, this release completes implementation of `dpnp.fft` module and adds
105117
* Updated `dpnp.fft` backend to depend on `INTEL_MKL_VERSION` flag to ensures that the appropriate code segment is executed based on the version of OneMKL [#2035](https://github.com/IntelPython/dpnp/pull/2035)
106118
* Use `dpctl::tensor::alloc_utils::sycl_free_noexcept` instead of `sycl::free` in `host_task` tasks associated with life-time management of temporary USM allocations [#2058](https://github.com/IntelPython/dpnp/pull/2058)
107119
* Improved implementation of `dpnp.kron` to avoid unnecessary copy for non-contiguous arrays [#2059](https://github.com/IntelPython/dpnp/pull/2059)
120+
* Updated the test suit for `dpnp.fft` module [#2071](https://github.com/IntelPython/dpnp/pull/2071)
108121

109122
### Fixed
110123

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ exclude-protected = ["_create_from_usm_ndarray"]
1616

1717
[tool.pylint.design]
1818
max-args = 11
19+
max-positional-arguments = 9
1920
max-locals = 30
2021
max-branches = 15
2122
max-returns = 8

tests/test_fft.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,13 @@ def test_fftn_out(self, axes, s):
564564
assert_dtype_allclose(iresult, iexpected, check_only_type_kind=True)
565565

566566
def test_negative_s(self):
567-
# stock NumPy 2.0, if s is -1, the whole input is used (no padding/trimming).
568-
a_np = numpy.empty((3, 4, 5), dtype=numpy.complex64)
567+
x1 = numpy.random.uniform(-10, 10, 60)
568+
x2 = numpy.random.uniform(-10, 10, 60)
569+
a_np = numpy.array(x1 + 1j * x2, dtype=numpy.complex64).reshape(3, 4, 5)
569570
a = dpnp.array(a_np)
570571

572+
# For dpnp and stock NumPy 2.0, if s is -1, the whole input is used
573+
# (no padding or trimming).
571574
result = dpnp.fft.fftn(a, s=(-1, -1), axes=(0, 2))
572575
expected = numpy.fft.fftn(a_np, s=(3, 5), axes=(0, 2))
573576
assert_dtype_allclose(result, expected, check_only_type_kind=True)

0 commit comments

Comments
 (0)