Thank you, Roger.  I didn't think of :: 0: for dealing with non-numeric arrays.

I think you need to ravel after you do {:"1 , otherwise you get

    real 2 2 $ 0j1 2 3 4
0 1

    real1 =: *./@:(0&=)@:([: , {:"1)@:+. ::0:

    real1 2 2 $ 0j1 2 3 4
0


On 10/8/2010 4:07 PM, Roger Hui wrote:
> real=: *./@:(0&=)@:({:"1)@:+. :: 0:
>
>
>
> ----- Original Message -----
> From: Kip Murray<[email protected]>
> Date: Friday, October 8, 2010 13:49
> Subject: [Jprogramming] Real Array
> To: [email protected]
>
>> Is there a way to test whether an array is real, i.e., numeric
>> and not
>> imaginary, without using 3!:0 ?  Where are such tests
>> found?  --Kip Murray
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to