Closed rainchen closed 6 years ago
Tests aren't passing because you're using eq
instead of be_within
. Just make that change and I'll merge.
@v0dro fixed and all tests passed.
But I'm aware that when using :gsl it will convert result into float values even the input value are integer, e.g.:
@dv = Daru::Vector.new [323, 11, 555, 666, 234, 21, 666, 343, 1, 2], dtype: :gsl
@dv.proportions
# {323.0=>0.1, 11.0=>0.1, 555.0=>0.1, 666.0=>0.2, 234.0=>0.1, 21.0=>0.1, 343.0=>0.1, 1.0=>0.1, 2.0=>0.1}
This is unexpected for me.
@v0dro all tests have passed
Merging your PR but can you please open an issue pointing out the behavior displayed by GSL?
@v0dro I'm not using GSL, not sure it's issue or not, although that behavior is unexpected for me.
bugfix for Vector#proportions, make it return float value