I observed in an article on the classification of time series using convolutional networks that the time series was first convert to recurrence plot and then used in the convolutional network.
The algorithm is explained in the legend to Fig 1 (one would only need to find out which distance measure was used). It should not be a big deal to progamm it in Python or any other language.
with x(i) the time series and i is the index. The calculation is quite simple, e.g., using two for-loops i and j for such pair-wise difference calculation. But you can also use a package for this. There are several:
http://www.recurrence-plot.tk/programmes.php
A recurrence plot is a binary matrix derived from the distance matrix by applying a threshold.
For you analysis, you can try such packages as pyunicorn (http://www.pik-potsdam.de/~donges/pyunicorn/) or pyRQA (https://pypi.org/project/PyRQA/). Also, on GitHub, I have found such repository (https://github.com/bmfreis/recurrence_python).