Closed parthm closed 6 years ago
Ha ha. Didn't realize @baarkerlounger had created a PR for the same request. Perhaps @zverok and @v0dro can merge one. I am OK if the other PR #398 is merged.
In case this one is to be merged, please let me know, I would like to add documentation for add_skipnil
. In the process of fixing this I realized that vector addition v0 + v1
suffers from this issue. So having a public method add_skipnil
can give users an option to add two vectors. v0.add_skipnil v1
.
Weird failure on Ruby 2.0 travis.
Failure/Error: @cat_hash = categories.map { |cat, group| [cat, group.map(&:last)] }.to_h
NoMethodError:
undefined method `to_h' for [[:a, [0, 2]], [1, [1, 3]], [:c, [4]]]:Array
Anyone knows what that is? Looks like PR #387 is also seeing the same error.
@parthm it's the removal of backports completely in @zverok's PR. I fixed it here #398 by just requiring the specific backport needed.
Since this looks to be a better solution I'll close my PR.
Adds support for
skipnil
flag as discussed in issue #391 . There is some common code betweenadd_skipnil
andv2v_binary
but I decided to keep these two separate to avoid performance penalty for all binary operation to support one scenario ofvector_sum
withskipnil
. Suggestions welcome.