def delete_if
      return to_enum(:delete_if) unless block_given?

      keep_e, keep_i = each_with_index.reject { |n, _i| yield(n) }.transpose

      @data = cast_vector_to @dtype, keep_e
      @index = Daru::Index.new(keep_i)

      update_position_cache

      self
    end
Delete an element if block returns true. Destructive.