Method: Daru::Index#is_values
- Defined in:
- lib/daru/index/index.rb
#is_values(*indexes) ⇒ Daru::Vector
Note:
Do not use it to check for Float::NAN as Float::NAN == Float::NAN is false
Return vector of booleans with value at ith position is either true or false depending upon whether index value at position i is equal to any of the values passed in the argument or not
232 233 234 235 |
# File 'lib/daru/index/index.rb', line 232 def is_values(*indexes) # rubocop:disable Style/PredicateName bool_array = @relation_hash.keys.map { |r| indexes.include?(r) } Daru::Vector.new(bool_array) end |