numo-optimize 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5bf17fec048bdf99094a8885389a99b41460947c008d213e11c371ee0025792
4
- data.tar.gz: 50346f22f0db6c04e33b5096f243a234e645fc2690789267d853c73918555a10
3
+ metadata.gz: 494f842f2dfe1df5163826fbb0905dd1d434886ae05afeb5e93533d56a2f1996
4
+ data.tar.gz: e4e27b61392041458c92f46aac62977672da7c84ba9f75555723c63da0e34ac1
5
5
  SHA512:
6
- metadata.gz: 99b8f8600c23d3f55695ec9baf9ddeb3e00ff294fe73a6fec3a82f201b25894202dc96f3cc49b0f8455f1a703628c70f873a683351037dcbe7093472ac6fba7b
7
- data.tar.gz: e95043ecd9e6b497aeb6fcedfe3fe6c9bcad124d45e5cecd89a7bda4ecf2bdb81041c5400667e0607033f3d61ac3a7b773b57518a5571b425041f1d53c90809a
6
+ metadata.gz: 76d1d6d28db23bb8e2d5ac0855b42ecdff06453b5c74515d808ef1673ed903b440986616112b1f3a5937c5a7683f08b30400c7dbd480b36e1ca759fb8d19902c
7
+ data.tar.gz: 23495b34a2673c7cbe9fde44893b14804b4049b317964b6ee481089c8af8487eb52f4e9c7a46163ec2246ded2367cac255833406fcb26ac545340b16ff74b581
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [[0.2.2](https://github.com/yoshoku/numo-optimize/compare/v0.2.1...v0.2.2)] - 2025-11-18
2
+
3
+ - Fix to use require for compatibility with distributions installing extensions separately.
4
+
5
+ ## [[0.2.1](https://github.com/yoshoku/numo-optimize/compare/v0.2.0...v0.2.1)] - 2025-11-18
6
+
7
+ - Set the required version of numo-narray-alt to 0.9.9 or higher.
8
+ - Change require statement to explicitly load numo/narray/alt.
9
+
1
10
  ## [[0.2.0](https://github.com/yoshoku/numo-optimize/compare/v0.1.0...v0.2.0)] - 2025-10-03
2
11
 
3
12
  - Add the scaled conjugate gradient method for minimization method:
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'mkmf'
4
- require 'numo/narray'
4
+ require 'numo/narray/alt'
5
5
 
6
6
  $LOAD_PATH.each do |lp|
7
7
  if File.exist?(File.join(lp, 'numo/numo/narray.h'))
@@ -14,8 +14,8 @@ abort 'numo/narray.h not found.' unless have_header('numo/narray.h')
14
14
 
15
15
  if RUBY_PLATFORM.match?(/mswin|cygwin|mingw/)
16
16
  $LOAD_PATH.each do |lp|
17
- if File.exist?(File.join(lp, 'numo/libnarray.a'))
18
- $LDFLAGS = "-L#{lp}/numo #{$LDFLAGS}"
17
+ if File.exist?(File.join(lp, 'numo/narray/libnarray.a'))
18
+ $LDFLAGS = "-L#{lp}/numo/narray #{$LDFLAGS}"
19
19
  break
20
20
  end
21
21
  end
@@ -5,6 +5,6 @@ module Numo
5
5
  # Numo::Optimize provides functions for minimizing objective functions.
6
6
  module Optimize
7
7
  # The version of numo-optimize you install.
8
- VERSION = '0.2.0'
8
+ VERSION = '0.2.2'
9
9
  end
10
10
  end
data/lib/numo/optimize.rb CHANGED
@@ -1,9 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'numo/narray'
3
+ require 'numo/narray/alt'
4
+
5
+ # On distributions like Rocky Linux, native extensions are installed in a separate
6
+ # directory from Ruby code, so use require to load them.
7
+ require 'numo/optimize/optimize'
4
8
 
5
9
  require_relative 'optimize/version'
6
- require_relative 'optimize/optimize'
7
10
  require_relative 'optimize/lbfgsb'
8
11
  require_relative 'optimize/scg'
9
12
  require_relative 'optimize/nelder_mead'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: numo-optimize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.9.3
18
+ version: 0.9.9
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 0.9.3
25
+ version: 0.9.9
26
26
  description: Numo::Optimize provides functions for minimizing objective functions.
27
27
  email:
28
28
  - yoshoku@outlook.com
@@ -59,7 +59,7 @@ metadata:
59
59
  homepage_uri: https://github.com/yoshoku/numo-optimize
60
60
  source_code_uri: https://github.com/yoshoku/numo-optimize
61
61
  changelog_uri: https://github.com/yoshoku/numo-optimize/blob/main/CHANGELOG.md
62
- documentation_uri: https://gemdocs.org/gems/numo-optimize/0.2.0/
62
+ documentation_uri: https://gemdocs.org/gems/numo-optimize/0.2.2/
63
63
  rubygems_mfa_required: 'true'
64
64
  rdoc_options: []
65
65
  require_paths: