Spaces:
Sleeping
Sleeping
Commit ·
2c794eb
1
Parent(s): 0562a88
Force the inclusion of (0,0) in the parameter grid
Browse files328 unmodified lines329330331332333334328 unmodified lines# build grid in parameter spacew1 = np.linspace(w1_range[0], w1_range[1], num_dots)w2 = np.linspace(w2_range[0], w2_range[1], num_dots)W1, W2 = np.meshgrid(w1, w2)return W1, W2328 unmodified lines329330331332333334335336337338339340341328 unmodified lines# build grid in parameter spacew1 = np.linspace(w1_range[0], w1_range[1], num_dots)w2 = np.linspace(w2_range[0], w2_range[1], num_dots)# include (0, 0)if 0 not in w1:w1 = np.insert(w1, np.searchsorted(w1, 0), 0)if 0 not in w2:w2 = np.insert(w2, np.searchsorted(w2, 0), 0)W1, W2 = np.meshgrid(w1, w2)return W1, W2
regularization.py+7