statsample icon indicating copy to clipboard operation
statsample copied to clipboard

Use of depraced DARU methods in statsample

Open BertramW opened this issue 8 years ago • 5 comments

Hi,

the last line in the following code raised an error:

require 'statsample'
a = Daru::Vector.new([1, 2, 3, 4, 5])
b = Daru::Vector.new([6, 7, 8, 9, 10])
t_2=Statsample::Test::T::TwoSamplesIndependent.new(a,b)
t_2.summary`

Messages:

Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:291.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:292.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:51.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:51.
NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#only_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:60.
NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#only_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:60.
NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#only_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:71.
NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#only_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:71.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:267.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:267.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:269.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:269.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:271.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:271.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:272.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:272.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:281.
NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#n_valid called from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:282.

I'm using ruby 2.1.7p400 (2015-08-18 revision 51632) [x64-mingw32] with following gems installed:

ansi (1.5.0) ast (2.2.0) awesome_print (1.7.0) backports (3.6.8) bigdecimal (default: 1.2.4) clbustos-rtf (0.4.2) daru (0.1.4.1) debase (0.2.2.beta8, 0.2.2.beta6, 0.2.1, 0.1.4) debase-ruby_core_source (0.8.0) dicom (0.9.6) dirty-memoize (0.0.4) distribution (0.7.3) extendmatrix (0.4) interpolate (0.3.0) interpolation (0.0.2) io-console (default: 0.4.3) json (default: 1.8.1) minimization (0.2.3) minitest (default: 4.7.5) oga (2.0.0) ox (2.2.3, 2.2.2) parallel (1.6.1) prawn (0.8.4) prawn-core (0.8.4) prawn-layout (0.8.4) prawn-security (0.8.4) prawn-svg (0.9.1.11) psych (default: 2.0.5) rake (default: 10.1.0) rdoc (default: 4.1.0) reportbuilder (1.4.2) rserve-client (0.3.1) ruby-debug-ide (0.6.1.beta2, 0.6.0, 0.4.32) ruby-ll (2.1.2) ruby-ole (1.2.12) rubyvis (0.6.1) spreadsheet (1.1.4) statsample (2.0.2) test-unit (default: 2.1.7.0) text-table (1.2.4) xml-simple (1.1.5)

Cheers, Bertram

BertramW avatar Dec 22 '16 12:12 BertramW

Hi Sameer,

I don't understand completely.

It would be great to have a patch with all 'only_valid' in statsample
replaced by 'n_valid'. But I as a user would like to avoid to patch
statsample .

All the best, Bertram

On Sun, 25 Dec 2016 21:22:57 +0100, Sameer Deshmukh
[email protected] wrote:

Will it be possible for you to submit a patch replacing all instances of
n_valid?

BertramW avatar Jan 02 '17 10:01 BertramW

The patch will involve replacing n_valid with count_values. If you could patch it and send a PR, I can merge it into the main branch.

v0dro avatar Jan 07 '17 06:01 v0dro

Too many error messages ... Many people will give up using statsample. I want to help, but I am not a programmer, so I have nothing to do. It is very disappointing.

kojix2 avatar Jul 30 '17 12:07 kojix2

@kojix2 @BertramW Try to use the master branch, there shouldn't be any problem.

@v0dro Releasing a new release should fix this for them.

lokeshh avatar Jul 30 '17 17:07 lokeshh

Gem has been updated and is awaiting release by @agarie . In the meanwhile you can clone from the github repo and use it. There should be no errors this time.

v0dro avatar Aug 10 '17 16:08 v0dro