3{.0$a:
++++
||||
++++
3{.0$1
0 0 0
<3{.0$''
+---+
| |
+---+
> both equal to a:, there is some difference which I am
> unable to figure out. (I did not include the program
3!:0 ] 3{.0$a:
32
3!:0 ] 3{.0$''
2
3!:0 ] 3{.0$1
1
3!:0 ] 3{.0$2
4
a=. 0$1
b=. 0$2
c=. 0$''
a-:b
1
a-:c
1
--- Sashikanth Chandrasekaran <[EMAIL PROTECTED]> wrote:
> Dear J programmers,
>
> I am using J504 on Linux.
>
> Consider three operands: x, y1, y2 and the spread
> function, #^:_1
>
> Isnt it true that if "y1 -: y2", then
> "(x #^:_1 y1) -: (x #^:_1 y2)" ?
>
> I understand that -: can return 1 for non-equal
> operands when they are equal under tolerant
> comparison. But in my example it does not appear that
> tolerant comparison should come into play.
>
> Here is my session output:
>
> x
> +-----+
> |0 0 0|
> +-----+
> y1
> ++
> ||
> ++
> y2
> ++
> ||
> ++
> y1 = a:
> 1
> y2 = a:
> 1
> y1 -: y2
> 1
> x #^:_1 each y1
> +----+
> |++++|
> ||||||
> |++++|
> +----+
> x #^:_1 each y2
> +-----+
> |0 0 0|
> +-----+
>
> The problem appears to be with the fills used by
> #^:_1.
> For y1, it is using a: as the fill and for y2 it is
> using 0 fills. I extracted y1 and y2 from a larger
> array and although y1 -: y2 returns 1 and they are
> both equal to a:, there is some difference which I am
> unable to figure out. (I did not include the program
> that generated this array because it is fairly large).
> When I explicitly create y1 and y2, I get the expected
>
> behavior.
>
> y1 =. a:
> y2 =. a:
> x #^:_1 each y1
> +-----+
> |0 0 0|
> +-----+
> x #^:_1 each y2
> +-----+
> |0 0 0|
> +-----+
>
> Can someone suggest how I could go about finding out
> the difference between the y1 and y2 that I extracted
> from the larger array?
> Thx, -sashi.
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm