https://technicalsource9.medium.com/how-we-can-use-fminsearch-with-a-vector-as-input-and-return-a-scaler-as-an-output-60f75093526d