Sha256: fb168d36ca91fb97c9984ea404310312b849032f2c2d2d9da623781c757c1833

Contents?: true

Size: 638 Bytes

Versions: 6

Compression:

Stored size: 638 Bytes

Contents

#!/usr/bin/ruby
$:.unshift(File.dirname(__FILE__)+'/../lib/')
# == Description
#
# This example provides a small sneak-peak into creating a Daru::Vector.
# For details on using Daru::Vector (with example on math, statistics and plotting)
# see the notebook at this link: 
# http://nbviewer.ipython.org/github/SciRuby/sciruby-notebooks/blob/master/Data%20Analysis/Usage%20of%20Vector.ipynb
require 'statsample'

Statsample::Analysis.store(Daru::Vector) do
  a = Daru::Vector.new_with_size(1000) {r=rand(5); r==4 ? nil: r;}
  summary a
  b = Daru::Vector[1,2,3,4,6..10]
  summary b
end

if __FILE__==$0
  Statsample::Analysis.run_batch
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
statsample-ekatena-2.0.2.1 examples/vector.rb
statsample-ekatena-2.0.2 examples/vector.rb
statsample-2.1.0 examples/vector.rb
statsample-2.0.2 examples/vector.rb
statsample-2.0.1 examples/vector.rb
statsample-2.0.0 examples/vector.rb