lib/rumale/preprocessing/ordinal_encoder.rb in rumale-0.13.8 vs lib/rumale/preprocessing/ordinal_encoder.rb in rumale-0.14.0

- old
+ new

@@ -89,10 +89,10 @@ # Decode values to categorical features. # # @param x [Numo::DFloat] (shape: [n_samples, n_features]) The samples consisting of values transformed from categorical features. # @return [Numo::NArray] The decoded features. def inverse_transform(x) - check_sample_array(x) + x = check_convert_sample_array(x) n_features = x.shape[1] raise ArgumentError, 'Expect the number of features and the number of categories to be equal' if n_features != @categories.size inv_transformed = Array.new(n_features) do |n|