New ScreenPanel

This commit is contained in:
2018-01-19 10:56:53 +01:00
commit ae4d621609
580 changed files with 46598 additions and 0 deletions

39
script/cpython3.py Executable file
View File

@@ -0,0 +1,39 @@
import tinynumpy.tinynumpy as np
import tinynumpy.tinylinalg as linalg
a = np.array([[1, 2, 3], [3, 4, 6.7], [5, 9.0, 5]])
print a
print a.transpose()
print linalg.det(a)
c = np.ones(3, 3) * 2
print c
print np.dot(a, c)
"""
from ctypes import *
TenIntegers = c_int * 10
ii = TenIntegers(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
print ii
for i in ii: print i,
print ""
#['CDLL', 'LibraryLoader', 'POINTER', 'Structure', 'Union', '_AggregateMetaClass', '_ArrayCData', '_CData', '_CTypeMetaClass', '_Function', '_ScalarCData', '_StructLayoutBuilder', '_StructMetaClass', '_TypeMap', '_UnionMetaClass', '__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__version__', '_pointer_type_cache', 'addressof', 'alignment', 'byref', 'c_bool', 'c_byte', 'c_char_p', 'c_double', 'c_float', 'c_int', 'c_int16', 'c_int32', 'c_int64', 'c_int8', 'c_long', 'c_longlong', 'c_short', 'c_size_t', 'c_ssize_t', 'c_ubyte', 'c_uint', 'c_uint16', 'c_uint32', 'c_uint64', 'c_uint8', 'c_ulong', 'c_ulonglong', 'c_ushort', 'c_void_p', 'cdll', 'jffi', 'memmove', 'memset', 'pointer', 'sizeof']
print isinstance(ii, ctypes._CData)
print ctypes.addressof(ii)
"""