[Scipy-svn] r4496 - trunk/scipy/sandbox/mkufunc

scipy-svn at scipy.org scipy-svn at scipy.org
Sat Jun 28 20:47:15 EDT 2008


Author: ilan
Date: 2008-06-28 19:47:14 -0500 (Sat, 28 Jun 2008)
New Revision: 4496

Removed:
   trunk/scipy/sandbox/mkufunc/test_1.py
Log:
Now all in test_mkufunc.py


Deleted: trunk/scipy/sandbox/mkufunc/test_1.py
===================================================================
--- trunk/scipy/sandbox/mkufunc/test_1.py	2008-06-29 00:45:36 UTC (rev 4495)
+++ trunk/scipy/sandbox/mkufunc/test_1.py	2008-06-29 00:47:14 UTC (rev 4496)
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-from math import sin, cos, pi
-
-from numpy import array
-
-from mkufunc import mkufunc
-
-int_const = 42
-
-float_const = 3.14
-
-def my_sqr(x):
-    return x * x / 1.23456
-
- at mkufunc([(float, float), (int, int)])
-def bar(n):
-    "Bar docstring"
-    if n < 10:
-        for i in xrange(10):
-            n += i*i
-        return n
-    elif n == 10:
-        return int_const
-    elif n == 11:
-        return float_const
-    elif n == 12:
-        return cos(pi)
-        #return 1
-    elif n > 12:
-        return my_sqr(n)
-    else:
-        return 5
-
-    
-#@mkufunc(float)
-#def baz(n):
-#    "Baz docstring"
-#    return n * n + 1000
-
-
-#print bar
-
-x = array([0.0, 1.0, 2.5, 12.0])
-print "x =", x, x.dtype
-y = bar(x)
-print "y =", y, y.dtype
-
-print bar(5)
-print bar(15)
-print bar(10)
-print bar(11)
-print bar(12)
-print bar(12.5)




More information about the Scipy-svn mailing list