diff --git a/notebooks/colab/jacobians_hessians_colab.ipynb b/notebooks/colab/jacobians_hessians_colab.ipynb index b2c2e39b0..4ec371e5a 100644 --- a/notebooks/colab/jacobians_hessians_colab.ipynb +++ b/notebooks/colab/jacobians_hessians_colab.ipynb @@ -483,9 +483,12 @@ " faster = second.times[0]\n", " slower = first.times[0]\n", " gain = (slower-faster)/slower\n", - " if gain < 0: gain *=-1 \n", + " faster_desc = second_descriptor\n", + " if gain < 0:\n", + " gain *=-1\n", + " faster_desc = first_descriptor\n", " final_gain = gain*100\n", - " print(f\" Performance delta: {final_gain:.4f} percent improvement with {second_descriptor} \")\n", + " print(f\" Performance delta: {final_gain:.4f} percent improvement with {faster_desc} \")\n", " " ], "metadata": { @@ -1117,4 +1120,4 @@ "outputs": [] } ] -} \ No newline at end of file +} diff --git a/notebooks/jacobians_hessians.ipynb b/notebooks/jacobians_hessians.ipynb index 172479ae7..4e46d9111 100644 --- a/notebooks/jacobians_hessians.ipynb +++ b/notebooks/jacobians_hessians.ipynb @@ -252,9 +252,12 @@ " faster = second.times[0]\n", " slower = first.times[0]\n", " gain = (slower-faster)/slower\n", - " if gain < 0: gain *=-1 \n", + " faster_desc = second_descriptor\n", + " if gain < 0:\n", + " gain *=-1\n", + " faster_desc = first_descriptor\n", " final_gain = gain*100\n", - " print(f\" Performance delta: {final_gain:.4f} percent improvement with {second_descriptor} \")" + " print(f\" Performance delta: {final_gain:.4f} percent improvement with {faster_desc} \")" ], "metadata": { "id": "II7r6jBtflUJ"