Skip to content

AttributeError on fft code #8393

@cliffburdick

Description

@cliffburdick

Description

With the following code:

        amf_2d = nfreq * cp.abs(cp.fft.fftshift(
            cp.fft.ifft(new_ynorm, nfreq, axis=1), axes=1))

An error is reported:

AttributeError: `np.compat` was removed in the NumPy 2.0 release. There's no replacement, as Python 2 is no longer supported.

To Reproduce

        amf_2d = nfreq * cp.abs(cp.fft.fftshift(
            cp.fft.ifft(new_ynorm, nfreq, axis=1), axes=1))

new_ynorm is a 2D complex array, and nfreq is a scalar

Installation

Wheel (pip install cupy-***)

Environment

OS                           : Linux-5.15.0-84-generic-x86_64-with-glibc2.35
Python Version               : 3.10.12
CuPy Version                 : 13.2.0
CuPy Platform                : NVIDIA CUDA
NumPy Version                : 2.0.0
SciPy Version                : 1.14.0
Cython Build Version         : 0.29.36
Cython Runtime Version       : None
CUDA Root                    : /usr/local/cuda
nvcc PATH                    : /usr/local/cuda/bin/nvcc
CUDA Build Version           : 12040
CUDA Driver Version          : 12050
CUDA Runtime Version         : 12040 (linked to CuPy) / 12050 (locally installed)
cuBLAS Version               : (available)
cuFFT Version                : 11203
cuRAND Version               : 10306
cuSOLVER Version             : (11, 6, 2)
cuSPARSE Version             : (available)
NVRTC Version                : (12, 5)
Thrust Version               : 200200
CUB Build Version            : 200200
Jitify Build Version         : <unknown>
cuDNN Build Version          : (not loaded; try `import cupy.cuda.cudnn` first)
cuDNN Version                : (not loaded; try `import cupy.cuda.cudnn` first)
NCCL Build Version           : 21602
NCCL Runtime Version         : 22105
cuTENSOR Version             : None
cuSPARSELt Build Version     : None
Device 0 Name                : NVIDIA A30
Device 0 Compute Capability  : 80
Device 0 PCI Bus ID          : 0000:41:00.0

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions