Last active
March 16, 2021 19:17
-
-
Save amrakm/1c145a17e3ce5ef92f297cb7b03131a6 to your computer and use it in GitHub Desktop.
Check if two numpy arrays are similar - useful for confirming ML implementations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## source: http://nbviewer.jupyter.org/github/rasbt/algorithms_in_ipython_notebooks/blob/master/ipython_nbs/statistics/linregr_least_squares_fit.ipynb#Sections | |
import numpy as np | |
np.testing.assert_almost_equal(arr_1, arr_2, decimal=5) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment