help-octave
[Top][All Lists]
Advanced

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

Re: is_complex_nd_array() ?


From: jjg
Subject: Re: is_complex_nd_array() ?
Date: Thu, 16 Aug 2012 16:53:45 -0700 (PDT)

Max Brister wrote
> 
>> Bizzarely, is_matrix_type() is true for matrices and NDarrays.
>>
>> I could see that is_nd_array_type() (which does not exist)
>> would be true for matrices, but an NDarray is a matrix type???
> 
> Matrix is a subclass of NDArray in Octave. I'm not sure why
> is_real_nd_array even exists, it looks like it always returns false.
> 

If Matrix is a subclass of NDArray, then one would expect that 
is_nd_array() would be true for matrices (since they are a
subclass).  But NDArray is not a subclass of Matrix, so finding
that is_matrix() is true for an NDArray is, well, freakish.

The principle of least surprise is violated here!




--
View this message in context: 
http://octave.1599824.n4.nabble.com/is-complex-nd-array-tp4642807p4642819.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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