octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #65414] fftn.cc, fft2.cc: Fix input validation


From: Hg200
Subject: [Octave-bug-tracker] [bug #65414] fftn.cc, fft2.cc: Fix input validation for zero-dimensional input data
Date: Mon, 4 Mar 2024 14:27:39 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?65414>

                 Summary: fftn.cc, fft2.cc: Fix input validation for
zero-dimensional input data
                   Group: GNU Octave
               Submitter: hg200
               Submitted: Mon 04 Mar 2024 07:27:39 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Inaccurate Result
                  Status: None
             Assigned to: None
         Originator Name: HG200
        Originator Email: 
             Open/Closed: Open
                 Release: other
         Discussion Lock: Any
        Operating System: Any
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 04 Mar 2024 07:27:39 PM UTC By: Hg200 <hg200>
If we call ifftn () with an input array containing zero dimensions, the input
data is passed straight down to oct-fftw.cc.

ifftn (ones (2, 0))

This case is catched by the fftw planner with the message

error: Error creating FFTW plan

but this can be unpredictable since catching invalid data formats by internal
code is not good practice. In this case Matlab returns an empty matrix with
the same size as the input array.

The command

ifft2 (ones (5, 4, 3, 0, 4))

also passes the input validation. I haven't checked where it is actually
catched.

The correction of the input validation is a prerequisite for solving bug
#43742 (ifft symmetric flag). The code that will be added will require greater
zero dimensions of the input data. Please find attached my patch proposal.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65414>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]