Dtype in Python

Hi, I am learning System of Linear Equation with Python and there is something I do not understand.

What is the dtype line that I highlighted used for? I thought that with Python, we don’t need to point out the type of data. Is it still okay if i don’t type that line?

Hello,

the reason why you should use dtype here is that grader is looking for data type in array form in which the numbers are float format, i.e. float contains decimals and integers.

please refer the below page to have complete understanding about dtype

https://numpy.org/doc/stable/reference/arrays.dtypes.html

So check you instructions for the codes you are working on, you will find what they are looking for, and if they are looking for array form outcome in float dtype, you will have to use the highlighted codes.

Regards
DP

I understand now, thank you so much