lib/rumale/kernel_approximation/nystroem.rb in rumale-kernel_approximation-0.25.0 vs lib/rumale/kernel_approximation/nystroem.rb in rumale-kernel_approximation-0.26.0

- old
+ new

@@ -69,10 +69,10 @@ raise 'Nystroem#fit requires Numo::Linalg but that is not loaded.' unless enable_linalg?(warning: false) # initialize some variables. sub_rng = @rng.dup n_samples = x.shape[0] - n_components = [1, [@params[:n_components], n_samples].min].max + n_components = [1, [@params[:n_components], n_samples].min].max # rubocop:disable Style/ComparableClamp # random sampling. @component_indices = Numo::Int32.cast(Array(0...n_samples).shuffle(random: sub_rng)[0...n_components]) @components = x[@component_indices, true].dup