Skip to content

Instantly share code, notes, and snippets.

@hungtatai
Created November 8, 2016 14:48
Show Gist options
  • Save hungtatai/8aaab57ca86807d1175ee1370c3bd666 to your computer and use it in GitHub Desktop.
Save hungtatai/8aaab57ca86807d1175ee1370c3bd666 to your computer and use it in GitHub Desktop.
require 'rubypython'
arg1, arg2, arg3 = 800, 900, 1000
RubyPython.start
np = RubyPython.import("numpy")
@result = np.random.triangular(arg1, arg2, arg3, 100000).to_a.map(&:to_s).map(&:to_f)
RubyPython.stop
puts @result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment