lib/lbfgsb.rb in lbfgsb-0.4.1 vs lib/lbfgsb.rb in lbfgsb-0.5.0
- old
+ new
@@ -41,10 +41,10 @@
# - success [Boolean] Whether or not the optimization exited successfully.
def minimize(fnc:, x_init:, jcb:, args: nil, bounds: nil, factr: 1e7, pgtol: 1e-5, maxcor: 10, maxiter: 15_000, verbose: nil)
n_elements = x_init.size
l = Numo::DFloat.zeros(n_elements)
u = Numo::DFloat.zeros(n_elements)
- nbd = Numo::Int64.zeros(n_elements)
+ nbd = SZ_F77_INTEGER == 64 ? Numo::Int64.zeros(n_elements) : Numo::Int32.zeros(n_elements)
unless bounds.nil?
n_elements.times do |n|
lower = bounds[n, 0]
upper = bounds[n, 1]