SciRuby / daru

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

Replace is_nil?, not_nil? #228

Closed lokeshh closed 7 years ago

lokeshh commented 8 years ago

Fixes #141

Replaces Vector#is_nil? and Vector#not_nil? with something else.

v0dro commented 8 years ago

How about include_values? and not_include_values?? That way it's consistent with Array#include? and the extra _values conveys that the behavior differs a little from the Array#include?. @zverok?

zverok commented 8 years ago

What it will return? If arrays of booleans -- then I still don't think that "predicate method sign" (?) is appropriate.

v0dro commented 8 years ago

@zverok it will return arrays of booleans. Yeah it makes sense to not have the ?.

zverok commented 7 years ago

Hey, guys, are we going to finalize this eventually? :) I think that we can at least go with nils/not_nils or existance(*values)/non_existance(*values). Or whatever!

v0dro commented 7 years ago

Yeah lets stick with include_values.

lokeshh commented 7 years ago

We already have include_values? to return true and false. I think it will be confusing to have include_values. Lets's have is_values. It also signifies that we are checking if the value is the same as what we are passing as argument, "include" could be confusing here. WDYT

v0dro commented 7 years ago

We already have include_values? to return true and false. I think it will be confusing to have include_values. Lets's have is_values. It also signifies that we are checking if the value is the same as what we are passing as argument, "include" could be confusing here. WDYT

Ah yes. is_values? seems like a good choice. @zverok ?

zverok commented 7 years ago

To be honest, I like neither, but can't come with a better name :) So, let's go with is_values!

v0dro commented 7 years ago

Works. is_values? is the way to go.

zverok commented 7 years ago

Just without question mark, I thought we've agreed on that ;)

v0dro commented 7 years ago

@lokeshh can you fix this? The PR is quite old.

lokeshh commented 7 years ago

Done finally. No more delay :)