June 2018
Beginner to intermediate
168 pages
3h 40m
English
In the following notebook, we create an ndarray. The first thing we're going to do is create a vector of 1s. Notice the tuple that is being passed; it contains only one number, 5. Therefore, it will be a one-dimensional ndarray with five elements:

It was automatically assigned the dtype floating-point 64:

If we want to convert this to an integer, we can attempt to do it the following way first, but the result will be garbage:
You need to be very careful when you're converting a dtype.
The correct way to do this is to first ...