Method: Daru::Vector#verify
- Defined in:
- lib/daru/vector.rb
#verify ⇒ Object
Reports all values that doesn’t comply with a condition. Returns a hash with the index of data and the invalid data.
739 740 741 742 743 744 |
# File 'lib/daru/vector.rb', line 739 def verify (0...size) .map { |i| [i, @data[i]] } .reject { |_i, val| yield(val) } .to_h end |