Sha256: 83275deb204fe5fc19dd5c4319458657ccb9b3dd017a59aab79175bc61ae7567

Contents?: true

Size: 372 Bytes

Versions: 16

Compression:

Stored size: 372 Bytes

Contents

module XGBoost
  module Utils
    private

    def check_result(err)
      if err != 0
        # make friendly
        message = FFI.XGBGetLastError.split("\n").first.split(/:\d+: /, 2).last
        raise XGBoost::Error, message
      end
    end

    # read_uint64 not available on JRuby
    def read_uint64(ptr)
      ptr.read_array_of_uint64(1).first
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
xgb-0.8.0 lib/xgboost/utils.rb
xgb-0.7.3 lib/xgboost/utils.rb
xgb-0.7.2 lib/xgboost/utils.rb
xgb-0.7.1 lib/xgboost/utils.rb
xgb-0.7.0 lib/xgboost/utils.rb
xgb-0.6.0 lib/xgboost/utils.rb
xgb-0.5.3 lib/xgboost/utils.rb
xgb-0.5.2 lib/xgboost/utils.rb
xgb-0.5.1 lib/xgboost/utils.rb
xgb-0.5.0 lib/xgboost/utils.rb
xgb-0.4.1 lib/xgboost/utils.rb
xgb-0.4.0 lib/xgboost/utils.rb
xgb-0.3.1 lib/xgboost/utils.rb
xgb-0.3.0 lib/xgboost/utils.rb
xgb-0.2.1 lib/xgboost/utils.rb
xgb-0.2.0 lib/xgboost/utils.rb