def testErfInvIntegerInput(self): with self.assertRaises(TypeError): x = np.array([1, 2, 3]).astype(np.int32) special_math.erfinv(x) with self.assertRaises(TypeError): x = np.array([1, 2, 3]).astype(np.int64) special_math.erfinv(x)
def testErfInvIntegerInput(self): with self.cached_session(): with self.assertRaises(TypeError): x = np.array([1, 2, 3]).astype(np.int32) special_math.erfinv(x) with self.assertRaises(TypeError): x = np.array([1, 2, 3]).astype(np.int64) special_math.erfinv(x)
def testErfInvValues(self): if not special: return x = np.linspace(0., 1., 50).astype(np.float64) self.assertAllClose(special.erfinv(x), self.evaluate(special_math.erfinv(x)), atol=0)
def testErfInvValues(self): with self.cached_session(): if not special: return x = np.linspace(0., 1.0, 50).astype(np.float64) expected_x = special.erfinv(x) x = special_math.erfinv(x) self.assertAllClose(expected_x, x.eval(), atol=0.)
def testErfInvValues(self): with self.cached_session(): if not special: return x = np.linspace(0., 1.0, 50).astype(np.float64) expected_x = special.erfinv(x) x = special_math.erfinv(x) self.assertAllClose(expected_x, x.eval(), atol=0.)
def _quantile(self, p): return np.sqrt(2.0) * self.scale * special_math.erfinv(p)
def _quantile(self, p): return np.sqrt(2.0) * self.scale * special_math.erfinv(p)