I should add that the nuvoc has some examples of implied rank, but I
can't figure out why a list of 10 numbers from an infinite ranked v
means rank 0 while a list of five numbers from infinite ranked v means
rank 1. I suspect what it's intended to mean is that the implied rank
is _1 and "_1 on a rank 1 list acts at rank 0 and "_1 on a rank 2 list
acts at rank 1. But that doesn't match the text of the description.

-- 
Raul

On Tue, Dec 26, 2023 at 6:10 PM Raul Miller <rauldmil...@gmail.com> wrote:
>
> It's not clear to me why this is a rank error.
>
>    2&|i.5
> 0 1 0 1 0
>    0:`1:@.0 1 0 1 0
> 0: 1: 0: 1: 0:
>    (0:`1:@.0 1 0 1 0) i.5
> 1
>
> That said, this line from nuvoc might be the issue:
>
> "The implied rank of m@.v y is the rank of y minus the rank of v y. y
> is then split into cells of that rank, and the gerund from m is
> applied to the appropriate cells. The gerund of m needs to be able to
> operate on a single cell of the implied rank, or an array of such
> cells, giving a result for each cell. The results are assembled into
> the final result."
>
> Here, the rank of v is infinite and the rank of y is 1, so the implied
> rank is __
>
> Still:
>
>    (0:`1:@.0 1 0 1 0)"__ i.5
> 1 1 1 1 1
>
> Anyways, it's not clear to me why infinite rank v throws an error (nor
> why there are exceptions for some lengths of y where it does not throw
> an error.)
>
> Thanks,
>
> --
> Raul
>
> On Tue, Dec 26, 2023 at 3:24 PM Henry Rich <henryhr...@gmail.com> wrote:
> >
> > See https://code.jsoftware.com/wiki/System/ReleaseNotes/J902
> >
> > Henry Rich
> >
> > On 12/26/2023 3:11 PM, Devon McCormick wrote:
> > > I don't know about the history but in 9.5.5 (under Windows 10):
> > >     (0:`1: @. (2&|)) i.4
> > > 0 1 0 1
> > >
> > > On Tue, Dec 26, 2023 at 7:44 AM Martin Kreuzer <i...@airkreuzer.com> 
> > > wrote:
> > >
> > >> Dear all -
> > >>
> > >> This left me puzzled today; have I missed some developments ?
> > >> (all in Console on Windows10)
> > >>
> > >> -  v8.07 -
> > >>
> > >>      (0:`1: @. (2&|)) i.1
> > >> |rank error
> > >> |       (0:`1:@.(2&|))i.1
> > >>
> > >> -  v9.0.1 -
> > >>
> > >>      (0:`1: @. (2&|)) i.1
> > >> |rank error
> > >> |       (0:`1:@.(2&|))i.1
> > >>
> > >> -  v9.0.2 -
> > >>
> > >>      (0:`1: @. (2&|)) i.4
> > >> 0 1 0 1
> > >>      (0:`1: @. (2&|)) i.5
> > >> |rank error
> > >> |       (0:`1:@.(2&|))i.5
> > >>
> > >> -  v9.5.1 -
> > >>
> > >>      (0:`1: @. (2&|)) i.4
> > >> 0 1 0 1
> > >>      (0:`1: @. (2&|)) i.5
> > >> |rank error, executing monad (0:`1:)@.(2&|)
> > >> |each gerund must return a result whose shape agrees with its inputs
> > >> |       (0:`1:@.(2&|))i.5
> > >>
> > >> What did happen between v9.0.1 andv 9.0.2 ?
> > >>
> > >> -Martin
> > >>
> > >> ----------------------------------------------------------------------
> > >> For information about J forums see http://www.jsoftware.com/forums.htm
> > >>
> > >
> >
> > ----------------------------------------------------------------------
> > 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