コード例 #1
0
ファイル: test_mpmath.py プロジェクト: 7islands/scipy
 def test_eulernum(self):
     assert_mpmath_equal(lambda n: sc.euler(n)[-1],
                         mpmath.eulernum,
                         [IntArg(1, 10000)], n=10000)
コード例 #2
0
 def test_eulernum(self):
     assert_mpmath_equal(lambda n: sc.euler(n)[-1],
                         mpmath.eulernum, [IntArg(1, 10000)],
                         n=10000)
コード例 #3
0
 def _mom(self, k):
     return np.abs(special.euler(k))[-1]
コード例 #4
0
 def _mom(self, k):
     return np.abs(special.euler(k))[-1]
コード例 #5
0
from scipy.special import euler

print(euler(2).astype(np.int64))
コード例 #6
0
 def _mom(self, k):
     return numpy.abs(special.euler(k.item())[-1])
コード例 #7
0
 def _mom(self, k):
     shape = k.shape
     output = numpy.abs([special.euler(k_)[-1] for k_ in k.flatten()])
     return output.reshape(shape)
コード例 #8
0
ファイル: hyperbolic_secant.py プロジェクト: hplgit/chaospy
 def _mom(self, k):
     shape = k.shape
     output = numpy.abs([special.euler(k_)[-1] for k_ in k.flatten()])
     return output.reshape(shape)