It's definitely an advantage to learn to code if you want to pursue machine learning. Machine learning is implemented by using various coding languages like C++, Java, Python, and many more hence to better understand and optimize the algorithm accordingly you will need to have a basic knowledge of coding at the least.