MCPcopy Create free account
hub / github.com/Apress/python-for-matlab-development / arrays

Function arrays

code/matlab_py/demo_py2mat.py:47–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45 'Z' : (225, 'blue')},
46 27.8]
47def arrays():
48 arr_int8 = np.array([1, 2], dtype=np.int8)
49 arr_uint8 = np.array([1, 2], dtype=np.uint8)
50 arr_int16 = np.array([1, 2], dtype=np.int16)
51 arr_uint16 = np.array([1, 2], dtype=np.uint16)
52 arr_int32 = np.array([1, 2], dtype=np.int32)
53 arr_uint32 = np.array([1, 2], dtype=np.uint32)
54 arr_int64 = np.array([1, 2], dtype=np.int64)
55 arr_uint64 = np.array([1, 2], dtype=np.uint64)
56 arr_float16 = np.array([1, 2], dtype=np.float16)
57 arr_float32 = np.array([1, 2], dtype=np.float32)
58 arr_float64 = np.array([1, 2], dtype=np.float64)
59 arr_complex64 = np.array([1-1j, 2-2j], dtype=np.complex64)
60 arr_complex128 = np.array([1-1j, 2-2j], dtype=np.complex128)
61 return arr_int8 , \
62 arr_uint8 , \
63 arr_int16 , \
64 arr_uint16 , \
65 arr_int32 , \
66 arr_uint32 , \
67 arr_int64 , \
68 arr_uint64 , \
69 arr_float16 , \
70 arr_float32 , \
71 arr_float64 , \
72 arr_complex64, \
73 arr_complex128

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected