Skip to content

Inproper exception when JaggedArray/JaggedList.transpose is used on arrays/lists with different lengths #33

@omaus

Description

@omaus

Description

When calling JaggedArray.transpose or JaggedList.transpose on arrays resp. lists with differently long arrays/lists inside, an exception is thrown. But this exception does not help detect the problem in a, say, long pipeline.

Repro steps

  1. Run this exemplary code snippet:
JaggedList.transpose [[1;2;3]; [4;5]]
JaggedArray.transpose [|[|1;2;3|]; [|4;5|]|]
  1. See errors.

Expected behavior

Throws an exception that tells the user that array/list elements are varying in length.

Actual behavior

Throws following exceptions:
System.ArgumentException: The input list was empty. (Parameter 'list'), resp.
System.IndexOutOfRangeException: Index was outside the bounds of the array..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions