def ifftn(B, shape=None): if shape != None: B = _checkffttype(B) B = procrustes(B, target=shape, side='after', padval=0) return _anfft.ifftn(B, measure=True)