As you can read in documentation:
a.view(some_dtype) or a.view(dtype=some_dtype) constructs a view of the array’s memory with a different data-type. This can cause a reinterpretation of the bytes of memory.
So you can create an array with different types like below:
>>> arr = np.array([1,2,3])
>>> arr2 = arr.view(dtype=np.int8)
>>> arr2
array([1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0], dtype=int8)
>>> arr2 = arr.view(dtype=np.int32)
array([1, 0, 2, 0, 3, 0], dtype=int32)
#You can change type and dtype like below
>>> arr2 = arr.view(dtype=np.int64, type=np.matrix)
>>> arr2
matrix([[1, 2, 3]])
If you write like below view and assign like same:
>>> arr2 = arr.view(dtype=np.int64)
>>> arr2.dtype
dtype('int64')
>>> arr3 = arr
>>> arr3.dtype
dtype('int64')