Exercise

Finding the euclidean distance with SciPy

Instead of writing multiple lines of code to calculate the euclidean distance, you can use SciPy. The library not only contains the euclidean function, but more than 40 other distance metrics—all a single import statement away.

Instructions

100 XP
  • Import the euclidean function from the relevant scipy module.
  • Use the euclidean() function on M and N.