help-octave
[Top][All Lists]
Advanced

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

Re: is_complex_nd_array() ?


From: Max Brister
Subject: Re: is_complex_nd_array() ?
Date: Thu, 16 Aug 2012 17:53:13 -0500

On Thu, Aug 16, 2012 at 3:09 PM, jjg <address@hidden> wrote:
> Hi all
>
> I'm writing an oct file which takes a real or complex NDarray as its
> first argument, but I fall at the first hurdle:
>
>   if (! (args(0).is_real_nd_array() ||
>          args(0).is_complex_nd_array()))
>     {
>       octave_stdout << "first argument must be an array\n";
>       return octave_value_list();
>     }
>
> Although an octave value has the is_real_nd_array() method, there
> is no corresponding complex version. Am I missing something?
> How would one test that the input is a real or complex NDarray ?
>
> Thanks in advance!
>

Using grep in the development source it looks like is_real_nd_array is
cruft that should be removed.

You should use is_real_type and is_complex_type instead.

Max Brister


reply via email to

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