There are multiple questions on StackOverflow, asking how the comma syntax works, but most of them refer to m[:,n]
which refers to the nth
column. Similarly, m[n,:]
refers to the nth
row. I find this method of slicing used in the labs of Machine Learning Specialization by Andrew Ng. But does this slicing have any advantage over m[n]
?
New contributor
Shirsak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.