Skip to content

mkl_fft._pydfti.rfftn_numpy error when using axes specification #37

Closed
@Jeitan

Description

@Jeitan

I originally posted this as a numpy issue, but after some research it appears to be something wrong with mkl_fft, although it only happens under Python 3 (and only in later releases, where "later" means past whatever the default was in Anaconda 5.0.1).

You can see some background on the issue here - the context is that I use numpy's rfftn to make a PSD of simulated ocean waves.

Long story short, when I make a conda environment like this:

> conda create --name test1 anaconda=2019.03 python=2

and this:

> conda create --name test2 anaconda=2019.03 python=3

If I have a numpy array called 'waves' that is dimensioned [64,512,512] and try to run the following:

import numpy.fft as nfft
realgood2 = nfft.rfftn(waves, axes=[2,1,0])

In test environment 1 it works perfectly. In test environment 2, I get this:

Traceback (most recent call last):
  File "gist.py", line 57, in <module>
    realgood2 = nfft.rfftn(waves, axes=[2,1,0])
  File "C:\Users\asmith\AppData\Local\Continuum\anaconda3\envs\3_2019.03\lib\site-packages\mkl_fft\_numpy_fft.py", line 1043, in rfftn
    output = mkl_fft.rfftn_numpy(a, s, axes)
  File "mkl_fft\_pydfti.pyx", line 951, in mkl_fft._pydfti.rfftn_numpy
ValueError: could not broadcast input array from shape (512,64) into shape (512,512)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions