1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436

437

438

439

440

441

442

443

444

445

446

447

448

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

466

467

468

469

470

471

472

473

474

475

476

477

478

479

480

481

482

483

484

485

486

487

488

489

490

491

492

493

494

495

496

497

498

499

500

501

502

503

504

505

506

507

508

509

510

511

512

513

514

515

516

517

518

519

520

521

522

523

524

525

526

527

528

529

530

531

532

533

534

535

536

537

538

539

540

541

542

543

544

545

546

547

548

549

550

551

552

553

554

555

556

557

558

559

560

561

562

563

564

565

566

567

568

569

570

571

572

573

574

575

576

577

578

579

580

581

582

583

584

585

586

587

588

589

590

591

592

593

594

595

596

597

598

599

600

601

602

603

604

605

606

607

608

609

610

611

612

613

614

615

616

617

618

619

620

621

622

623

624

625

626

627

628

629

630

631

632

633

634

635

636

637

638

639

640

641

642

643

644

645

646

647

648

649

650

651

652

653

654

655

656

657

658

659

660

661

""" 

======================================== 

Special functions (:mod:`scipy.special`) 

======================================== 

 

.. module:: scipy.special 

 

Nearly all of the functions below are universal functions and follow 

broadcasting and automatic array-looping rules. Exceptions are 

noted. 

 

.. seealso:: 

 

`scipy.special.cython_special` -- Typed Cython versions of special functions 

 

 

Error handling 

============== 

 

Errors are handled by returning NaNs or other appropriate values. 

Some of the special function routines can emit warnings or raise 

exceptions when an error occurs. By default this is disabled; to 

query and control the current error handling state the following 

functions are provided. 

 

.. autosummary:: 

:toctree: generated/ 

 

geterr -- Get the current way of handling special-function errors. 

seterr -- Set how special-function errors are handled. 

errstate -- Context manager for special-function error handling. 

SpecialFunctionWarning -- Warning that can be emitted by special functions. 

SpecialFunctionError -- Exception that can be raised by special functions. 

 

Available functions 

=================== 

 

Airy functions 

-------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

airy -- Airy functions and their derivatives. 

airye -- Exponentially scaled Airy functions and their derivatives. 

ai_zeros -- [+]Compute `nt` zeros and values of the Airy function Ai and its derivative. 

bi_zeros -- [+]Compute `nt` zeros and values of the Airy function Bi and its derivative. 

itairy -- Integrals of Airy functions 

 

 

Elliptic Functions and Integrals 

-------------------------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

ellipj -- Jacobian elliptic functions 

ellipk -- Complete elliptic integral of the first kind. 

ellipkm1 -- Complete elliptic integral of the first kind around `m` = 1 

ellipkinc -- Incomplete elliptic integral of the first kind 

ellipe -- Complete elliptic integral of the second kind 

ellipeinc -- Incomplete elliptic integral of the second kind 

 

Bessel Functions 

---------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

jv -- Bessel function of the first kind of real order and complex argument. 

jve -- Exponentially scaled Bessel function of order `v`. 

yn -- Bessel function of the second kind of integer order and real argument. 

yv -- Bessel function of the second kind of real order and complex argument. 

yve -- Exponentially scaled Bessel function of the second kind of real order. 

kn -- Modified Bessel function of the second kind of integer order `n` 

kv -- Modified Bessel function of the second kind of real order `v` 

kve -- Exponentially scaled modified Bessel function of the second kind. 

iv -- Modified Bessel function of the first kind of real order. 

ive -- Exponentially scaled modified Bessel function of the first kind 

hankel1 -- Hankel function of the first kind 

hankel1e -- Exponentially scaled Hankel function of the first kind 

hankel2 -- Hankel function of the second kind 

hankel2e -- Exponentially scaled Hankel function of the second kind 

 

The following is not an universal function: 

 

.. autosummary:: 

:toctree: generated/ 

 

lmbda -- [+]Jahnke-Emden Lambda function, Lambdav(x). 

 

Zeros of Bessel Functions 

^^^^^^^^^^^^^^^^^^^^^^^^^ 

 

These are not universal functions: 

 

.. autosummary:: 

:toctree: generated/ 

 

jnjnp_zeros -- [+]Compute zeros of integer-order Bessel functions Jn and Jn'. 

jnyn_zeros -- [+]Compute nt zeros of Bessel functions Jn(x), Jn'(x), Yn(x), and Yn'(x). 

jn_zeros -- [+]Compute zeros of integer-order Bessel function Jn(x). 

jnp_zeros -- [+]Compute zeros of integer-order Bessel function derivative Jn'(x). 

yn_zeros -- [+]Compute zeros of integer-order Bessel function Yn(x). 

ynp_zeros -- [+]Compute zeros of integer-order Bessel function derivative Yn'(x). 

y0_zeros -- [+]Compute nt zeros of Bessel function Y0(z), and derivative at each zero. 

y1_zeros -- [+]Compute nt zeros of Bessel function Y1(z), and derivative at each zero. 

y1p_zeros -- [+]Compute nt zeros of Bessel derivative Y1'(z), and value at each zero. 

 

Faster versions of common Bessel Functions 

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

 

.. autosummary:: 

:toctree: generated/ 

 

j0 -- Bessel function of the first kind of order 0. 

j1 -- Bessel function of the first kind of order 1. 

y0 -- Bessel function of the second kind of order 0. 

y1 -- Bessel function of the second kind of order 1. 

i0 -- Modified Bessel function of order 0. 

i0e -- Exponentially scaled modified Bessel function of order 0. 

i1 -- Modified Bessel function of order 1. 

i1e -- Exponentially scaled modified Bessel function of order 1. 

k0 -- Modified Bessel function of the second kind of order 0, :math:`K_0`. 

k0e -- Exponentially scaled modified Bessel function K of order 0 

k1 -- Modified Bessel function of the second kind of order 1, :math:`K_1(x)`. 

k1e -- Exponentially scaled modified Bessel function K of order 1 

 

Integrals of Bessel Functions 

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

 

.. autosummary:: 

:toctree: generated/ 

 

itj0y0 -- Integrals of Bessel functions of order 0 

it2j0y0 -- Integrals related to Bessel functions of order 0 

iti0k0 -- Integrals of modified Bessel functions of order 0 

it2i0k0 -- Integrals related to modified Bessel functions of order 0 

besselpoly -- [+]Weighted integral of a Bessel function. 

 

Derivatives of Bessel Functions 

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

 

.. autosummary:: 

:toctree: generated/ 

 

jvp -- Compute nth derivative of Bessel function Jv(z) with respect to `z`. 

yvp -- Compute nth derivative of Bessel function Yv(z) with respect to `z`. 

kvp -- Compute nth derivative of real-order modified Bessel function Kv(z) 

ivp -- Compute nth derivative of modified Bessel function Iv(z) with respect to `z`. 

h1vp -- Compute nth derivative of Hankel function H1v(z) with respect to `z`. 

h2vp -- Compute nth derivative of Hankel function H2v(z) with respect to `z`. 

 

Spherical Bessel Functions 

^^^^^^^^^^^^^^^^^^^^^^^^^^ 

 

.. autosummary:: 

:toctree: generated/ 

 

spherical_jn -- Spherical Bessel function of the first kind or its derivative. 

spherical_yn -- Spherical Bessel function of the second kind or its derivative. 

spherical_in -- Modified spherical Bessel function of the first kind or its derivative. 

spherical_kn -- Modified spherical Bessel function of the second kind or its derivative. 

 

Riccati-Bessel Functions 

^^^^^^^^^^^^^^^^^^^^^^^^ 

 

These are not universal functions: 

 

.. autosummary:: 

:toctree: generated/ 

 

riccati_jn -- [+]Compute Ricatti-Bessel function of the first kind and its derivative. 

riccati_yn -- [+]Compute Ricatti-Bessel function of the second kind and its derivative. 

 

Struve Functions 

---------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

struve -- Struve function. 

modstruve -- Modified Struve function. 

itstruve0 -- Integral of the Struve function of order 0. 

it2struve0 -- Integral related to the Struve function of order 0. 

itmodstruve0 -- Integral of the modified Struve function of order 0. 

 

 

Raw Statistical Functions 

------------------------- 

 

.. seealso:: :mod:`scipy.stats`: Friendly versions of these functions. 

 

.. autosummary:: 

:toctree: generated/ 

 

bdtr -- Binomial distribution cumulative distribution function. 

bdtrc -- Binomial distribution survival function. 

bdtri -- Inverse function to `bdtr` with respect to `p`. 

bdtrik -- Inverse function to `bdtr` with respect to `k`. 

bdtrin -- Inverse function to `bdtr` with respect to `n`. 

btdtr -- Cumulative density function of the beta distribution. 

btdtri -- The `p`-th quantile of the beta distribution. 

btdtria -- Inverse of `btdtr` with respect to `a`. 

btdtrib -- btdtria(a, p, x) 

fdtr -- F cumulative distribution function. 

fdtrc -- F survival function. 

fdtri -- The `p`-th quantile of the F-distribution. 

fdtridfd -- Inverse to `fdtr` vs dfd 

gdtr -- Gamma distribution cumulative density function. 

gdtrc -- Gamma distribution survival function. 

gdtria -- Inverse of `gdtr` vs a. 

gdtrib -- Inverse of `gdtr` vs b. 

gdtrix -- Inverse of `gdtr` vs x. 

nbdtr -- Negative binomial cumulative distribution function. 

nbdtrc -- Negative binomial survival function. 

nbdtri -- Inverse of `nbdtr` vs `p`. 

nbdtrik -- Inverse of `nbdtr` vs `k`. 

nbdtrin -- Inverse of `nbdtr` vs `n`. 

ncfdtr -- Cumulative distribution function of the non-central F distribution. 

ncfdtridfd -- Calculate degrees of freedom (denominator) for the noncentral F-distribution. 

ncfdtridfn -- Calculate degrees of freedom (numerator) for the noncentral F-distribution. 

ncfdtri -- Inverse cumulative distribution function of the non-central F distribution. 

ncfdtrinc -- Calculate non-centrality parameter for non-central F distribution. 

nctdtr -- Cumulative distribution function of the non-central `t` distribution. 

nctdtridf -- Calculate degrees of freedom for non-central t distribution. 

nctdtrit -- Inverse cumulative distribution function of the non-central t distribution. 

nctdtrinc -- Calculate non-centrality parameter for non-central t distribution. 

nrdtrimn -- Calculate mean of normal distribution given other params. 

nrdtrisd -- Calculate standard deviation of normal distribution given other params. 

pdtr -- Poisson cumulative distribution function 

pdtrc -- Poisson survival function 

pdtri -- Inverse to `pdtr` vs m 

pdtrik -- Inverse to `pdtr` vs k 

stdtr -- Student t distribution cumulative density function 

stdtridf -- Inverse of `stdtr` vs df 

stdtrit -- Inverse of `stdtr` vs `t` 

chdtr -- Chi square cumulative distribution function 

chdtrc -- Chi square survival function 

chdtri -- Inverse to `chdtrc` 

chdtriv -- Inverse to `chdtr` vs `v` 

ndtr -- Gaussian cumulative distribution function. 

log_ndtr -- Logarithm of Gaussian cumulative distribution function. 

ndtri -- Inverse of `ndtr` vs x 

chndtr -- Non-central chi square cumulative distribution function 

chndtridf -- Inverse to `chndtr` vs `df` 

chndtrinc -- Inverse to `chndtr` vs `nc` 

chndtrix -- Inverse to `chndtr` vs `x` 

smirnov -- Kolmogorov-Smirnov complementary cumulative distribution function 

smirnovi -- Inverse to `smirnov` 

kolmogorov -- Complementary cumulative distribution function of Kolmogorov distribution 

kolmogi -- Inverse function to kolmogorov 

tklmbda -- Tukey-Lambda cumulative distribution function 

logit -- Logit ufunc for ndarrays. 

expit -- Expit ufunc for ndarrays. 

boxcox -- Compute the Box-Cox transformation. 

boxcox1p -- Compute the Box-Cox transformation of 1 + `x`. 

inv_boxcox -- Compute the inverse of the Box-Cox transformation. 

inv_boxcox1p -- Compute the inverse of the Box-Cox transformation. 

owens_t -- Owen's T Function. 

 

 

Information Theory Functions 

---------------------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

entr -- Elementwise function for computing entropy. 

rel_entr -- Elementwise function for computing relative entropy. 

kl_div -- Elementwise function for computing Kullback-Leibler divergence. 

huber -- Huber loss function. 

pseudo_huber -- Pseudo-Huber loss function. 

 

 

Gamma and Related Functions 

--------------------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

gamma -- Gamma function. 

gammaln -- Logarithm of the absolute value of the Gamma function for real inputs. 

loggamma -- Principal branch of the logarithm of the Gamma function. 

gammasgn -- Sign of the gamma function. 

gammainc -- Regularized lower incomplete gamma function. 

gammaincinv -- Inverse to `gammainc` 

gammaincc -- Regularized upper incomplete gamma function. 

gammainccinv -- Inverse to `gammaincc` 

beta -- Beta function. 

betaln -- Natural logarithm of absolute value of beta function. 

betainc -- Incomplete beta integral. 

betaincinv -- Inverse function to beta integral. 

psi -- The digamma function. 

rgamma -- Gamma function inverted 

polygamma -- Polygamma function n. 

multigammaln -- Returns the log of multivariate gamma, also sometimes called the generalized gamma. 

digamma -- psi(x[, out]) 

poch -- Rising factorial (z)_m 

 

 

Error Function and Fresnel Integrals 

------------------------------------ 

 

.. autosummary:: 

:toctree: generated/ 

 

erf -- Returns the error function of complex argument. 

erfc -- Complementary error function, ``1 - erf(x)``. 

erfcx -- Scaled complementary error function, ``exp(x**2) * erfc(x)``. 

erfi -- Imaginary error function, ``-i erf(i z)``. 

erfinv -- Inverse function for erf. 

erfcinv -- Inverse function for erfc. 

wofz -- Faddeeva function 

dawsn -- Dawson's integral. 

fresnel -- Fresnel sin and cos integrals 

fresnel_zeros -- Compute nt complex zeros of sine and cosine Fresnel integrals S(z) and C(z). 

modfresnelp -- Modified Fresnel positive integrals 

modfresnelm -- Modified Fresnel negative integrals 

 

These are not universal functions: 

 

.. autosummary:: 

:toctree: generated/ 

 

erf_zeros -- [+]Compute nt complex zeros of error function erf(z). 

fresnelc_zeros -- [+]Compute nt complex zeros of cosine Fresnel integral C(z). 

fresnels_zeros -- [+]Compute nt complex zeros of sine Fresnel integral S(z). 

 

Legendre Functions 

------------------ 

 

.. autosummary:: 

:toctree: generated/ 

 

lpmv -- Associated Legendre function of integer order and real degree. 

sph_harm -- Compute spherical harmonics. 

 

These are not universal functions: 

 

.. autosummary:: 

:toctree: generated/ 

 

clpmn -- [+]Associated Legendre function of the first kind for complex arguments. 

lpn -- [+]Legendre function of the first kind. 

lqn -- [+]Legendre function of the second kind. 

lpmn -- [+]Sequence of associated Legendre functions of the first kind. 

lqmn -- [+]Sequence of associated Legendre functions of the second kind. 

 

Ellipsoidal Harmonics 

--------------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

ellip_harm -- Ellipsoidal harmonic functions E^p_n(l) 

ellip_harm_2 -- Ellipsoidal harmonic functions F^p_n(l) 

ellip_normal -- Ellipsoidal harmonic normalization constants gamma^p_n 

 

Orthogonal polynomials 

---------------------- 

 

The following functions evaluate values of orthogonal polynomials: 

 

.. autosummary:: 

:toctree: generated/ 

 

assoc_laguerre -- Compute the generalized (associated) Laguerre polynomial of degree n and order k. 

eval_legendre -- Evaluate Legendre polynomial at a point. 

eval_chebyt -- Evaluate Chebyshev polynomial of the first kind at a point. 

eval_chebyu -- Evaluate Chebyshev polynomial of the second kind at a point. 

eval_chebyc -- Evaluate Chebyshev polynomial of the first kind on [-2, 2] at a point. 

eval_chebys -- Evaluate Chebyshev polynomial of the second kind on [-2, 2] at a point. 

eval_jacobi -- Evaluate Jacobi polynomial at a point. 

eval_laguerre -- Evaluate Laguerre polynomial at a point. 

eval_genlaguerre -- Evaluate generalized Laguerre polynomial at a point. 

eval_hermite -- Evaluate physicist's Hermite polynomial at a point. 

eval_hermitenorm -- Evaluate probabilist's (normalized) Hermite polynomial at a point. 

eval_gegenbauer -- Evaluate Gegenbauer polynomial at a point. 

eval_sh_legendre -- Evaluate shifted Legendre polynomial at a point. 

eval_sh_chebyt -- Evaluate shifted Chebyshev polynomial of the first kind at a point. 

eval_sh_chebyu -- Evaluate shifted Chebyshev polynomial of the second kind at a point. 

eval_sh_jacobi -- Evaluate shifted Jacobi polynomial at a point. 

 

The following functions compute roots and quadrature weights for 

orthogonal polynomials: 

 

.. autosummary:: 

:toctree: generated/ 

 

roots_legendre -- Gauss-Legendre quadrature. 

roots_chebyt -- Gauss-Chebyshev (first kind) quadrature. 

roots_chebyu -- Gauss-Chebyshev (second kind) quadrature. 

roots_chebyc -- Gauss-Chebyshev (first kind) quadrature. 

roots_chebys -- Gauss-Chebyshev (second kind) quadrature. 

roots_jacobi -- Gauss-Jacobi quadrature. 

roots_laguerre -- Gauss-Laguerre quadrature. 

roots_genlaguerre -- Gauss-generalized Laguerre quadrature. 

roots_hermite -- Gauss-Hermite (physicst's) quadrature. 

roots_hermitenorm -- Gauss-Hermite (statistician's) quadrature. 

roots_gegenbauer -- Gauss-Gegenbauer quadrature. 

roots_sh_legendre -- Gauss-Legendre (shifted) quadrature. 

roots_sh_chebyt -- Gauss-Chebyshev (first kind, shifted) quadrature. 

roots_sh_chebyu -- Gauss-Chebyshev (second kind, shifted) quadrature. 

roots_sh_jacobi -- Gauss-Jacobi (shifted) quadrature. 

 

The functions below, in turn, return the polynomial coefficients in 

:class:`~.orthopoly1d` objects, which function similarly as :ref:`numpy.poly1d`. 

The :class:`~.orthopoly1d` class also has an attribute ``weights`` which returns 

the roots, weights, and total weights for the appropriate form of Gaussian 

quadrature. These are returned in an ``n x 3`` array with roots in the first 

column, weights in the second column, and total weights in the final column. 

Note that :class:`~.orthopoly1d` objects are converted to ``poly1d`` when doing 

arithmetic, and lose information of the original orthogonal polynomial. 

 

.. autosummary:: 

:toctree: generated/ 

 

legendre -- [+]Legendre polynomial. 

chebyt -- [+]Chebyshev polynomial of the first kind. 

chebyu -- [+]Chebyshev polynomial of the second kind. 

chebyc -- [+]Chebyshev polynomial of the first kind on :math:`[-2, 2]`. 

chebys -- [+]Chebyshev polynomial of the second kind on :math:`[-2, 2]`. 

jacobi -- [+]Jacobi polynomial. 

laguerre -- [+]Laguerre polynomial. 

genlaguerre -- [+]Generalized (associated) Laguerre polynomial. 

hermite -- [+]Physicist's Hermite polynomial. 

hermitenorm -- [+]Normalized (probabilist's) Hermite polynomial. 

gegenbauer -- [+]Gegenbauer (ultraspherical) polynomial. 

sh_legendre -- [+]Shifted Legendre polynomial. 

sh_chebyt -- [+]Shifted Chebyshev polynomial of the first kind. 

sh_chebyu -- [+]Shifted Chebyshev polynomial of the second kind. 

sh_jacobi -- [+]Shifted Jacobi polynomial. 

 

.. warning:: 

 

Computing values of high-order polynomials (around ``order > 20``) using 

polynomial coefficients is numerically unstable. To evaluate polynomial 

values, the ``eval_*`` functions should be used instead. 

 

 

Hypergeometric Functions 

------------------------ 

 

.. autosummary:: 

:toctree: generated/ 

 

hyp2f1 -- Gauss hypergeometric function 2F1(a, b; c; z). 

hyp1f1 -- Confluent hypergeometric function 1F1(a, b; x) 

hyperu -- Confluent hypergeometric function U(a, b, x) of the second kind 

hyp0f1 -- Confluent hypergeometric limit function 0F1. 

hyp2f0 -- Hypergeometric function 2F0 in y and an error estimate 

hyp1f2 -- Hypergeometric function 1F2 and error estimate 

hyp3f0 -- Hypergeometric function 3F0 in y and an error estimate 

 

 

Parabolic Cylinder Functions 

---------------------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

pbdv -- Parabolic cylinder function D 

pbvv -- Parabolic cylinder function V 

pbwa -- Parabolic cylinder function W 

 

These are not universal functions: 

 

.. autosummary:: 

:toctree: generated/ 

 

pbdv_seq -- [+]Parabolic cylinder functions Dv(x) and derivatives. 

pbvv_seq -- [+]Parabolic cylinder functions Vv(x) and derivatives. 

pbdn_seq -- [+]Parabolic cylinder functions Dn(z) and derivatives. 

 

Mathieu and Related Functions 

----------------------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

mathieu_a -- Characteristic value of even Mathieu functions 

mathieu_b -- Characteristic value of odd Mathieu functions 

 

These are not universal functions: 

 

.. autosummary:: 

:toctree: generated/ 

 

mathieu_even_coef -- [+]Fourier coefficients for even Mathieu and modified Mathieu functions. 

mathieu_odd_coef -- [+]Fourier coefficients for even Mathieu and modified Mathieu functions. 

 

The following return both function and first derivative: 

 

.. autosummary:: 

:toctree: generated/ 

 

mathieu_cem -- Even Mathieu function and its derivative 

mathieu_sem -- Odd Mathieu function and its derivative 

mathieu_modcem1 -- Even modified Mathieu function of the first kind and its derivative 

mathieu_modcem2 -- Even modified Mathieu function of the second kind and its derivative 

mathieu_modsem1 -- Odd modified Mathieu function of the first kind and its derivative 

mathieu_modsem2 -- Odd modified Mathieu function of the second kind and its derivative 

 

Spheroidal Wave Functions 

------------------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

pro_ang1 -- Prolate spheroidal angular function of the first kind and its derivative 

pro_rad1 -- Prolate spheroidal radial function of the first kind and its derivative 

pro_rad2 -- Prolate spheroidal radial function of the secon kind and its derivative 

obl_ang1 -- Oblate spheroidal angular function of the first kind and its derivative 

obl_rad1 -- Oblate spheroidal radial function of the first kind and its derivative 

obl_rad2 -- Oblate spheroidal radial function of the second kind and its derivative. 

pro_cv -- Characteristic value of prolate spheroidal function 

obl_cv -- Characteristic value of oblate spheroidal function 

pro_cv_seq -- Characteristic values for prolate spheroidal wave functions. 

obl_cv_seq -- Characteristic values for oblate spheroidal wave functions. 

 

The following functions require pre-computed characteristic value: 

 

.. autosummary:: 

:toctree: generated/ 

 

pro_ang1_cv -- Prolate spheroidal angular function pro_ang1 for precomputed characteristic value 

pro_rad1_cv -- Prolate spheroidal radial function pro_rad1 for precomputed characteristic value 

pro_rad2_cv -- Prolate spheroidal radial function pro_rad2 for precomputed characteristic value 

obl_ang1_cv -- Oblate spheroidal angular function obl_ang1 for precomputed characteristic value 

obl_rad1_cv -- Oblate spheroidal radial function obl_rad1 for precomputed characteristic value 

obl_rad2_cv -- Oblate spheroidal radial function obl_rad2 for precomputed characteristic value 

 

Kelvin Functions 

---------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

kelvin -- Kelvin functions as complex numbers 

kelvin_zeros -- [+]Compute nt zeros of all Kelvin functions. 

ber -- Kelvin function ber. 

bei -- Kelvin function bei 

berp -- Derivative of the Kelvin function `ber` 

beip -- Derivative of the Kelvin function `bei` 

ker -- Kelvin function ker 

kei -- Kelvin function ker 

kerp -- Derivative of the Kelvin function ker 

keip -- Derivative of the Kelvin function kei 

 

These are not universal functions: 

 

.. autosummary:: 

:toctree: generated/ 

 

ber_zeros -- [+]Compute nt zeros of the Kelvin function ber(x). 

bei_zeros -- [+]Compute nt zeros of the Kelvin function bei(x). 

berp_zeros -- [+]Compute nt zeros of the Kelvin function ber'(x). 

beip_zeros -- [+]Compute nt zeros of the Kelvin function bei'(x). 

ker_zeros -- [+]Compute nt zeros of the Kelvin function ker(x). 

kei_zeros -- [+]Compute nt zeros of the Kelvin function kei(x). 

kerp_zeros -- [+]Compute nt zeros of the Kelvin function ker'(x). 

keip_zeros -- [+]Compute nt zeros of the Kelvin function kei'(x). 

 

Combinatorics 

------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

comb -- [+]The number of combinations of N things taken k at a time. 

perm -- [+]Permutations of N things taken k at a time, i.e., k-permutations of N. 

 

Lambert W and Related Functions 

------------------------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

lambertw -- Lambert W function. 

wrightomega -- Wright Omega function. 

 

Other Special Functions 

----------------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

agm -- Arithmetic, Geometric Mean. 

bernoulli -- Bernoulli numbers B0..Bn (inclusive). 

binom -- Binomial coefficient 

diric -- Periodic sinc function, also called the Dirichlet function. 

euler -- Euler numbers E0..En (inclusive). 

expn -- Exponential integral E_n 

exp1 -- Exponential integral E_1 of complex argument z 

expi -- Exponential integral Ei 

factorial -- The factorial of a number or array of numbers. 

factorial2 -- Double factorial. 

factorialk -- [+]Multifactorial of n of order k, n(!!...!). 

shichi -- Hyperbolic sine and cosine integrals. 

sici -- Sine and cosine integrals. 

spence -- Spence's function, also known as the dilogarithm. 

zeta -- Riemann zeta function. 

zetac -- Riemann zeta function minus 1. 

 

Convenience Functions 

--------------------- 

 

.. autosummary:: 

:toctree: generated/ 

 

cbrt -- Cube root of `x` 

exp10 -- 10**x 

exp2 -- 2**x 

radian -- Convert from degrees to radians 

cosdg -- Cosine of the angle `x` given in degrees. 

sindg -- Sine of angle given in degrees 

tandg -- Tangent of angle x given in degrees. 

cotdg -- Cotangent of the angle `x` given in degrees. 

log1p -- Calculates log(1+x) for use when `x` is near zero 

expm1 -- exp(x) - 1 for use when `x` is near zero. 

cosm1 -- cos(x) - 1 for use when `x` is near zero. 

round -- Round to nearest integer 

xlogy -- Compute ``x*log(y)`` so that the result is 0 if ``x = 0``. 

xlog1py -- Compute ``x*log1p(y)`` so that the result is 0 if ``x = 0``. 

logsumexp -- Compute the log of the sum of exponentials of input elements. 

exprel -- Relative error exponential, (exp(x)-1)/x, for use when `x` is near zero. 

sinc -- Return the sinc function. 

 

.. [+] in the description indicates a function which is not a universal 

.. function and does not follow broadcasting and automatic 

.. array-looping rules. 

 

""" 

 

from __future__ import division, print_function, absolute_import 

 

from .sf_error import SpecialFunctionWarning, SpecialFunctionError 

 

from ._ufuncs import * 

 

from .basic import * 

from ._logsumexp import logsumexp 

from . import specfun 

from . import orthogonal 

from .orthogonal import * 

from .spfun_stats import multigammaln 

from ._ellip_harm import ellip_harm, ellip_harm_2, ellip_normal 

from .lambertw import lambertw 

from ._spherical_bessel import (spherical_jn, spherical_yn, spherical_in, 

spherical_kn) 

 

__all__ = [s for s in dir() if not s.startswith('_')] 

 

from numpy.dual import register_func 

register_func('i0',i0) 

del register_func 

 

from scipy._lib._testutils import PytestTester 

test = PytestTester(__name__) 

del PytestTester