Conversation
marcandre
commented
Nov 11, 2020
sig/matrix_gen.rbs
Outdated
| 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)?]) |
Member
Author
There was a problem hiding this comment.
@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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.