From c2dac0a271793b1ce128fe49785fd82b2cb5cc1e Mon Sep 17 00:00:00 2001 From: ian-coccimiglio Date: Sun, 8 Sep 2024 23:46:10 -0700 Subject: [PATCH 1/2] More flexible standard deviation acceptance --- test_cases/mean_std_column.ipynb | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/test_cases/mean_std_column.ipynb b/test_cases/mean_std_column.ipynb index b39f809..b25935d 100644 --- a/test_cases/mean_std_column.ipynb +++ b/test_cases/mean_std_column.ipynb @@ -19,7 +19,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 35, "id": "2243e607-8d2d-4a77-b612-64d8223d70db", "metadata": {}, "outputs": [], @@ -37,46 +37,37 @@ " \n", " result_mean, result_std = candidate(df, \"a\")\n", " assert abs(result_mean - 3.938) < 0.001\n", - " assert abs(result_std - 1.170) < 0.001\n", - "\n", + " assert ((abs(result_std - 1.170) < 0.001) or (abs(result_std- 1.218) < 0.001))\n", "\n", " result_mean, result_std = candidate(df, \"b\")\n", " assert abs(result_mean - 0.415) < 0.001\n", - " assert abs(result_std - 0.151) < 0.001\n", + " assert ((abs(result_std - 0.151) < 0.001) or (abs(result_std- 0.157) < 0.001))\n", "\n", " result_mean, result_std = candidate(df, \"c\")\n", " assert abs(result_mean - 3.931) < 0.001\n", - " assert abs(result_std - 1.160) < 0.001\n", + " assert ((abs(result_std - 1.160) < 0.001) or (abs(result_std- 1.207) < 0.001))\n", "\n", " result_mean, result_std = candidate(df, \"d\")\n", " assert abs(result_mean - 3.946) < 0.001\n", - " assert abs(result_std - 1.168) < 0.001\n" + " assert ((abs(result_std - 1.168) < 0.001) or (abs(result_std- 1.216) < 0.001))\n" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 36, "id": "577fd3b1-aa81-40c0-8a27-88e86ba48718", "metadata": {}, "outputs": [], "source": [ "check(mean_std_column)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d470d040-51c2-4b57-a8bd-82565c6e1642", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python [conda env:heb]", "language": "python", - "name": "python3" + "name": "conda-env-heb-py" }, "language_info": { "codemirror_mode": { From 128fe251ba02c4174ee11081f87dfe678304a0bc Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Fri, 13 Sep 2024 10:43:14 +0200 Subject: [PATCH 2/2] clean rerun notebook --- test_cases/mean_std_column.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test_cases/mean_std_column.ipynb b/test_cases/mean_std_column.ipynb index b25935d..b98173a 100644 --- a/test_cases/mean_std_column.ipynb +++ b/test_cases/mean_std_column.ipynb @@ -19,7 +19,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 2, "id": "2243e607-8d2d-4a77-b612-64d8223d70db", "metadata": {}, "outputs": [], @@ -54,7 +54,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 3, "id": "577fd3b1-aa81-40c0-8a27-88e86ba48718", "metadata": {}, "outputs": [], @@ -65,9 +65,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python [conda env:heb]", + "display_name": "Python 3 (ipykernel)", "language": "python", - "name": "conda-env-heb-py" + "name": "python3" }, "language_info": { "codemirror_mode": {