Slicingoperation

i didn’t understand slicing in this matrix can you please explain?

Hey,
are you talking about the slicing done in scatter plot?
plt.scatter(dist[:,0], dist[:,1])
So basically this means, we are plotting all the values of 0th column of dist var on x-axis, and all the values of 1st column of dist var on y-axis.
colon means everything (so all rows) and after putting a comma we specified 0 which mean (all rows of 0th column)

I hope this clears your doubt.
Thanks :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.