Skip to content

Conversation

marcandre
Copy link
Member

No description provided.

@marcandre marcandre marked this pull request as draft November 11, 2020 04:30
def column_vectors : -> (Array[(Matrix | Vector)?])
def to_matrix : -> Matrix
def to_a : -> (Array[(Array[Integer] | Array[Integer] | Array[untyped] | String)?])
def to_a : -> (Array[(Array[Integer] | Array[Integer] | Array[untyped] | Integer | String)?])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mame:
In this PR, you get the generated rbs file from typeprof after I've replaced each_with_index with each.with_index.
First commit shows result without any hint. This commit I tell it Matrix@rows and Vector@elements which should help a lot... but it makes some things worse. The perfect result here should be Array[Array[numeric]] (if it could reuse my type definition), or Array[Array[Integer | Float | Rational | Complex]] otherwise.

Array[nil] or Array[String] are very wrong...
Note that Array[Integer] | Array[Integer] is redundant.

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.

1 participant