Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
omaus opened this issue Apr 8, 2023 · 0 comments · May be fixed by #34

Comments

@omaus
Copy link
Member

omaus commented Apr 8, 2023

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant