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

Odd results with lib/matrix #15

Open
marcandre opened this issue Nov 11, 2020 · 1 comment
Open

Odd results with lib/matrix #15

marcandre opened this issue Nov 11, 2020 · 1 comment

Comments

@marcandre
Copy link
Member

marcandre commented Nov 11, 2020

See this PR and this comment I made Updated below

In particular, if I give a type of @rows, I was expecting to see attr_reader rows : <exact same type here>. Instead I get a complex expression.

@marcandre
Copy link
Member Author

marcandre commented Nov 11, 2020

(Updated as of f881fbe)

So an initial commit shows result without any hint.
With this commit I tell it Matrix@rows and Vector@elements which should help a lot... but it doesn't improve things much.

First, I was expecting attr_reader rows : Array[Array[numeric]] (if it could reuse my type definition), or Array[Array[Integer | Float | Rational | Complex]] otherwise.

The result I get is really complex and includes Array[(... | String)?], this is very wrong.

Another good test is to_a, which should have the same signature, but I get a simple answer this time (Array[(Integer | String)?]), but it is invalid.

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

No branches or pull requests

1 participant