本文整理汇总了Python中backend.Dist类的典型用法代码示例。如果您正苦于以下问题:Python Dist类的具体用法?Python Dist怎么用?Python Dist使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Dist类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, A, B):
a = not isinstance(A, Dist) or 1 and len(A)
b = not isinstance(B, Dist) or 1 and len(B)
length = max(a,b)
Dist.__init__(self, A=A, B=B,
_length=length, _advance=True)
开发者ID:apetcho,项目名称:chaospy,代码行数:7,代码来源:operators.py
示例2: __init__
def __init__(self, A, B):
if isinstance(A, Dist):
assert not A.dependent()
if isinstance(B, Dist):
assert not B.dependent()
a = not isinstance(A, Dist) or 1 and len(A)
b = not isinstance(B, Dist) or 1 and len(B)
length = max(a, b)
Dist.__init__(self, A=A, B=B,
_length=length, _advance=True)
开发者ID:sjhernes,项目名称:chaospy,代码行数:10,代码来源:operators.py
示例3: __init__
def __init__(self, dist, trans):
"""
Parameters
----------
dist : Dist
Distribution to wrap the copula around
trans : Dist
The copula wrapper. [0,1]^D \into [0,1]^D
"""
Dist.__init__(self, dist=dist, trans=trans, _advance=True, _length=len(trans))
开发者ID:apetcho,项目名称:chaospy,代码行数:10,代码来源:copulas.py
示例4: __init__
def __init__(self, loc=[0,0], scale=[[1,.5],[.5,1]]):
loc, scale = np.asfarray(loc), np.asfarray(scale)
assert len(loc)==len(scale)
dist = joint.Iid(normal(), len(loc))
C = np.linalg.cholesky(scale)
Ci = np.linalg.inv(C)
Dist.__init__(self, dist=dist, loc=loc, C=C, Ci=Ci,
scale=scale, _length=len(scale), _advance=True)
开发者ID:jp5000,项目名称:chaospy,代码行数:10,代码来源:cores.py
示例5: __init__
def __init__(self, dist, N):
"""
Parameters
----------
dist : Dist
Input variable. Must have `len(dist)==1`.
N : int
Number of variable in the output.
"""
assert len(dist)==1 and N>1
Dist.__init__(self, dist=dist, _length=N)
开发者ID:apetcho,项目名称:chaospy,代码行数:11,代码来源:joint.py
示例6: __init__
def __init__(self, dist):
Dist.__init__(self, dist=dist, _length=len(dist),
_advance=True)
开发者ID:apetcho,项目名称:chaospy,代码行数:3,代码来源:trignometric.py
注:本文中的backend.Dist类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论