Consider

   I. 1 0 1 0 0 0
0 2
   (e.~ [: i. 1 + >./) I. 1 0 1
1 0 1
   (e.~ [: i. 1 + >./) I. 1 0 1 0  0  0
1 0 1

How long should the result be?

Thanks,

-- 
Raul

On Wed, Oct 2, 2019 at 12:50 PM Michal Wallace <[email protected]> wrote:
>
> Does I.inv have a working implementation?
>
> I'd expect the domain to be any ascending sequence of positive whole
> numbers (possibly with repeats):
>
>    3 4 9 e.~ i.10
> 0 0 0 1 1 0 0 0 0 1
>    I. 3 4 9 e.~ i.10
> 3 4 9
>    I. (i.@:>:@(>./) e. ]) 3 4 9    NB. hypothetical I.inv, doesn't handle
> repeats
> 3 4 9
>
> But anything I throw at it gives me a domain error:
>
>    I.inv 3 4 9
> |domain error
> |       I.inv 3 4 9
>
>
> What am I missing?
> ----------------------------------------------------------------------
> 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