SciRuby / daru

Data Analysis in RUby
BSD 2-Clause "Simplified" License
1.03k stars 139 forks source link

Feature/map to vector #513

Closed him666 closed 4 years ago

him666 commented 5 years ago

added map_to_vector wrapper methods in order to solve the next issue https://github.com/SciRuby/daru/issues/512

tried to avoid breaking changes since the Gem relies a lot on the normal map method that returns an array.

kojix2 commented 5 years ago

Thank you for your PR.

But to be honest, I don't want to add the map_to_vector method. Because recode method already exists.

The problem is that the recode method is hard to find. The naming of map_to_vector may be better than recode.

However, my opinion is that the behavior of map should be that of recode or map_to_vector. And the to_a method is sufficient to convert a Daru::Vector to an Array.

But I'm not sure if this idea is really good. I will read Daru's code this month..

Shekharrajak commented 5 years ago

@kojix2 , yes! I was thinking the same. Also it is written in recode docs. @him666 , please have a look whether map is overridden or not

v0dro commented 4 years ago

Closing since we need a changed map method.