import numpy as np

# Example: ndarry objects

# create 2x3 ndarray of floats from a list of lists

m = np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float32)

print("m.shape =", m.shape)

print("m.dtype =", m.dtype)

print("m =\n" + str(m))

m = m.astype(np.int32) # cast the ndarray from float to int

print("m =\n" + str(m))