Skip to content

Unexpected result of 1D FFT on Fortran arrays of array rank > 2 #13

Closed
@oleksandr-pavlyk

Description

@oleksandr-pavlyk

FFT transformation on different transpositions of the same array should give the same result, within a reasonbale threshold.

This is currently (v1.0.2) not the case as verified by:

import numpy as np
import mkl_fft

d_ccont = np.random.randn(2, 3, 2)
assert d_ccont.flags['C'] and not d_ccont.flags['F']
d_fcont = np.asfortranarray(d_ccont)
assert d_fcont.flags['F'] and not d_fcont.flags['C']

assert np.allclose(d_ccont, d_fcont) # data as the same

f1 = mkl_fft.fft(d_ccont)
f2 = mkl_fft.fft(d_fcont)

assert np.allclose(f1, f2) # this checks fails to pass

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