Skip to content

fix: negative rank bug#173

Open
AshyIsMe wants to merge 1 commit intomainfrom
171-bug-compose-edge-case
Open

fix: negative rank bug#173
AshyIsMe wants to merge 1 commit intomainfrom
171-bug-compose-edge-case

Conversation

@AshyIsMe
Copy link
Owner

@AshyIsMe AshyIsMe commented Mar 21, 2023

Originally I thought this was a bug with compose but it's actually a negative rank bug:

In jsoft:

    (i.5 2) (,&<"1) i.5 5
┌───┬──────────────┐
│0 1│0 1 2 3 4     │
├───┼──────────────┤
│2 3│5 6 7 8 9     │
├───┼──────────────┤
│4 5│10 11 12 13 14│
├───┼──────────────┤
│6 7│15 16 17 18 19│
├───┼──────────────┤
│8 9│20 21 22 23 24│
└───┴──────────────┘
    (i.5 2) (,&<"_1) i.5 5
┌───┬──────────────┐
│0 1│0 1 2 3 4     │
├───┼──────────────┤
│2 3│5 6 7 8 9     │
├───┼──────────────┤
│4 5│10 11 12 13 14│
├───┼──────────────┤
│6 7│15 16 17 18 19│
├───┼──────────────┤
│8 9│20 21 22 23 24│
└───┴──────────────┘

In jr:

   (i.5 2) (,&<"1) i.5 5
┌───┬──────────────┐
│0 1│0 1 2 3 4     │
├───┼──────────────┤
│2 3│5 6 7 8 9     │
├───┼──────────────┤
│4 5│10 11 12 13 14│
├───┼──────────────┤
│6 7│15 16 17 18 19│
├───┼──────────────┤
│8 9│20 21 22 23 24│
└───┴──────────────┘

   (i.5 2) (,&<"_1) i.5 5
error: x and y do not agree, or an argument has invalid length
cause: x:[5, 2] y:[5, 5], common: [5]
cause: generating cells
cause: dyadic rank drifting
cause: applying function to cells
cause: x: IntArray([[0, 1],
 [2, 3],
 [4, 5],
 [6, 7],
 [8, 9]])
cause: y: IntArray([[0, 1, 2, 3, 4],
 [5, 6, 7, 8, 9],
 [10, 11, 12, 13, 14],
 [15, 16, 17, 18, 19],
 [20, 21, 22, 23, 24]])
cause: dyadic partial: ((, & <) " _1)
cause: evaluating 2 dyad
cause: evaluating "(i.5 2) (,&<\"_1) i.5 5"
   

jsoft:

   <"_1 i.5 5
┌─────────┬─────────┬──────────────┬──────────────┬──────────────┐
│0 1 2 3 4│5 6 7 8 9│10 11 12 13 14│15 16 17 18 19│20 21 22 23 24│
└─────────┴─────────┴──────────────┴──────────────┴──────────────┘
   

jr:

   NB. INCORRECT:
   <"_1 i.5 5
┌──┬──┬──┬──┬──┐
│0 │1 │2 │3 │4 │
├──┼──┼──┼──┼──┤
│5 │6 │7 │8 │9 │
├──┼──┼──┼──┼──┤
│10│11│12│13│14│
├──┼──┼──┼──┼──┤
│15│16│17│18│19│
├──┼──┼──┼──┼──┤
│20│21│22│23│24│
└──┴──┴──┴──┴──┘

   

@AshyIsMe AshyIsMe linked an issue Mar 21, 2023 that may be closed by this pull request
@AshyIsMe AshyIsMe changed the title fix: compose & edge case fix: negative rank bug Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: compose edge case

1 participant