File: _ufuncall.py

package info (click to toggle)
python-numarray 1.1.1-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 7,428 kB
  • ctags: 8,469
  • sloc: ansic: 92,018; python: 20,861; makefile: 263; sh: 13
file content (24 lines) | stat: -rw-r--r-- 476 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import numinclude

types = "Bool Int8 UInt8 Int16 UInt16 Int32 UInt32 Float32 Float64 Complex32 Complex64".split()

types.append("Int64")
if numinclude.hasUInt64:
    types.append("UInt64")

_modules = []

for t in types:
    m = "_ufunc" + t
    exec("import "+m)
    exec("_modules.append(%s)"  % m)

functionDict = {}
for m in _modules:
    functionDict.update(m.functionDict)

for t in types:
    m = "_ufunc" + t
    exec("del "+m)

del numinclude, m, _modules, t, types