Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sean Leavey
pykat
Commits
ca11ad10
Commit
ca11ad10
authored
9 years ago
by
Andreas Freise
Browse files
Options
Downloads
Patches
Plain Diff
adding jacobi.py
parent
bb3dc798
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pykat/math/jacobi.py
+17
-0
17 additions, 0 deletions
pykat/math/jacobi.py
with
17 additions
and
0 deletions
pykat/math/jacobi.py
0 → 100644
+
17
−
0
View file @
ca11ad10
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
from
__future__
import
unicode_literals
import
numpy
as
np
import
scipy.special
def
jacobi
(
n
,
a
,
b
,
x
):
"""
Implementation of Jacobi fucntion using binominal coefficients.
This can handle values of alpha, beta < -1 which the special.eval_jacobi
function cannot.
"""
P
=
0.0
for
s
in
np
.
arange
(
0
,
n
+
1
):
P
=
P
+
scipy
.
special
.
binom
(
n
+
a
,
s
)
*
scipy
.
special
.
binom
(
n
+
b
,
n
-
s
)
*
(
x
-
1.0
)
**
(
n
-
s
)
*
(
x
+
1.0
)
**
s
P
=
P
*
0.5
**
n
return
P
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment