File: testcast.rb

package info (click to toggle)
libnarray-ruby 0.5.9p7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 432 kB
  • ctags: 517
  • sloc: ansic: 4,412; ruby: 1,281; python: 91; makefile: 5
file content (14 lines) | stat: -rw-r--r-- 250 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'narray'

def test a,b
  print a," #=> "
  p b
end

a = NArray.int(3,3).indgen!

test "a",a
test "a+1.5",a+1.5
test "1.5+a",1.5+a
test "a+NArray[1.2,3.4,5.6]",a+NArray[1.2,3.4,5.6]
test "a+NArray[Complex(0.5,1.5)]",a+NArray[Complex(0.5,1.5)]