Added code for minimum-scalar-product for python3.