-
Notifications
You must be signed in to change notification settings - Fork 140
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
Feature/map to vector #513
Conversation
context "#map_to_vector!" do | ||
it "maps to vector destructive" do | ||
@common_all_dtypes.map_to_vector! { |v| v } | ||
expect(@common_all_dtypes).to eq(Daru::Vector.new([5, 5, 5, 5, 5, 6, 6, 7, 8, 9, 10, 1, 2, 3, 4, 11, -99, -99])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line length should not go > 79 characters.
|
||
it "maps to vector destructive" do | ||
@common_all_dtypes.map_to_vector! { |v| v + 1} | ||
expect(@common_all_dtypes).to eq(Daru::Vector.new([6, 6, 6, 6, 6, 7, 7, 8, 9, 10, 11, 2, 3, 4, 5, 12, -98, -98])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line length should not go > 79 characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the comment it is good to go.
Thanks for the PR
Thank you for your PR. But to be honest, I don't want to add the The problem is that the However, my opinion is that the behavior of But I'm not sure if this idea is really good. |
@kojix2 , yes! I was thinking the same. Also it is written in recode docs. @him666 , please have a look whether |
Closing since we need a changed |
added map_to_vector wrapper methods in order to solve the next issue
#512
tried to avoid breaking changes since the Gem relies a lot on the normal map method that returns an array.