def test_nanstd_with_ddof(self): x = np.random.uniform(0, 10, (20, 100)) for axis in [None, 0, 1]: np.testing.assert_almost_equal( np.nanstd(x, axis=axis, ddof=10), nanstd(csr_matrix(x), axis=axis, ddof=10), )
def _get_error_bar(self): std = nanstd(self.y_data, axis=0) return pg.ErrorBarItem(x=self.x_data, y=self.__mean, bottom=std, top=std, beam=0.01)
def test_nanstd(self, array): for X in self.data: X_sparse = array(X) np.testing.assert_array_equal(nanstd(X_sparse), np.nanstd(X))
def test_nanstd(self, array): for X in self.data: X_sparse = array(X) np.testing.assert_array_equal( nanstd(X_sparse), np.nanstd(X))