Skip to content

Commit

Permalink
Merge pull request #126 from ian-coccimiglio/fix_stdev
Browse files Browse the repository at this point in the history
Adjust mean_std_column to accept both pandas and numpy stdev
  • Loading branch information
haesleinhuepf authored Sep 13, 2024
2 parents 3adede0 + 128fe25 commit 4b1cc18
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions test_cases/mean_std_column.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,19 @@
" \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"
]
},
{
Expand All @@ -62,14 +61,6 @@
"source": [
"check(mean_std_column)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d470d040-51c2-4b57-a8bd-82565c6e1642",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 4b1cc18

Please sign in to comment.