Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
a2c30e1a
提交
a2c30e1a
authored
12月 14, 2022
作者:
Maxim Kochurov
提交者:
Maxim Kochurov
12月 16, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
manual curation of docs to eliminate 90% of warnings
上级
b7ac8a08
显示空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
46 行增加
和
64 行删除
+46
-64
conf.py
doc/conf.py
+2
-1
environment.yml
doc/environment.yml
+1
-1
type.rst
doc/extending/type.rst
+2
-2
using_params.rst
doc/extending/using_params.rst
+0
-1
io.rst
doc/library/compile/io.rst
+2
-2
opfromgraph.rst
doc/library/compile/opfromgraph.rst
+2
-2
index.rst
doc/library/graph/index.rst
+0
-1
params_type.rst
doc/library/graph/params_type.rst
+0
-16
index.rst
doc/library/index.rst
+0
-1
index.rst
doc/library/sandbox/index.rst
+0
-1
basic.rst
doc/library/tensor/basic.rst
+2
-5
sparse.rst
doc/sandbox/sparse.rst
+1
-1
troubleshooting.rst
doc/troubleshooting.rst
+3
-3
profiling.rst
doc/tutorial/profiling.rst
+1
-0
environment.yml
environment.yml
+1
-1
op.py
pytensor/graph/op.py
+2
-0
basic.py
pytensor/graph/rewriting/basic.py
+0
-0
pkl_utils.py
pytensor/misc/pkl_utils.py
+2
-1
elemwise.py
pytensor/tensor/elemwise.py
+1
-1
math.py
pytensor/tensor/math.py
+4
-4
math.py
pytensor/tensor/rewriting/math.py
+1
-1
var.py
pytensor/tensor/var.py
+19
-19
没有找到文件。
doc/conf.py
浏览文件 @
a2c30e1a
...
@@ -113,7 +113,8 @@ pygments_style = "sphinx"
...
@@ -113,7 +113,8 @@ pygments_style = "sphinx"
# html4_writer added to Fix colon & whitespace misalignment
# html4_writer added to Fix colon & whitespace misalignment
# https://github.com/readthedocs/sphinx_rtd_theme/issues/766#issuecomment-513852197
# https://github.com/readthedocs/sphinx_rtd_theme/issues/766#issuecomment-513852197
html4_writer
=
True
# https://github.com/readthedocs/sphinx_rtd_theme/issues/766#issuecomment-629666319
# html4_writer = False
html_logo
=
"images/pytensor_logo.svg"
html_logo
=
"images/pytensor_logo.svg"
html_theme
=
"pymc_sphinx_theme"
html_theme
=
"pymc_sphinx_theme"
...
...
doc/environment.yml
浏览文件 @
a2c30e1a
...
@@ -9,7 +9,7 @@ dependencies:
...
@@ -9,7 +9,7 @@ dependencies:
-
numpy
-
numpy
-
scipy
-
scipy
-
six
-
six
-
sphinx>=
3
-
sphinx>=
5.1.0
-
mock
-
mock
-
pillow
-
pillow
-
pip
-
pip
...
...
doc/extending/type.rst
浏览文件 @
a2c30e1a
...
@@ -324,8 +324,8 @@ For certain mechanisms, you can register functions and other such
...
@@ -324,8 +324,8 @@ For certain mechanisms, you can register functions and other such
things to plus your type into pytensor's mechanisms. These are optional
things to plus your type into pytensor's mechanisms. These are optional
but will allow people to use you type with familiar interfaces.
but will allow people to use you type with familiar interfaces.
`transfer`
**`transfer`**
~~~~~~~~~~
To plug in additional options for the transfer target, define a
To plug in additional options for the transfer target, define a
function which takes an PyTensor variable and a target argument and
function which takes an PyTensor variable and a target argument and
...
...
doc/extending/using_params.rst
浏览文件 @
a2c30e1a
...
@@ -76,7 +76,6 @@ attribute :attr:`params_type` to an instance of your params Type.
...
@@ -76,7 +76,6 @@ attribute :attr:`params_type` to an instance of your params Type.
If you want to have multiple parameters, PyTensor provides the convenient class
If you want to have multiple parameters, PyTensor provides the convenient class
:class:`pytensor.link.c.params_type.ParamsType` that allows to bundle many parameters into
:class:`pytensor.link.c.params_type.ParamsType` that allows to bundle many parameters into
one object that will be available in both Python (as a Python object) and C code (as a struct).
one object that will be available in both Python (as a Python object) and C code (as a struct).
See :ref:`ParamsType tutorial and API documentation <libdoc_graph_params_type>` for more infos.
For example if we decide to use an int as the params the following
For example if we decide to use an int as the params the following
would be appropriate:
would be appropriate:
...
...
doc/library/compile/io.rst
浏览文件 @
a2c30e1a
...
@@ -6,9 +6,9 @@
...
@@ -6,9 +6,9 @@
.. _function_inputs:
.. _function_inputs:
===========================================
===========================================
=
:mod:`io` - defines pytensor.function [TODO]
:mod:`io` - defines pytensor.function [TODO]
===========================================
===========================================
=
.. module:: pytensor.compile.io
.. module:: pytensor.compile.io
:platform: Unix, Windows
:platform: Unix, Windows
...
...
doc/library/compile/opfromgraph.rst
浏览文件 @
a2c30e1a
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
.. _opfromgraph:
.. _opfromgraph:
============
============
=
`OpFromGraph`
`OpFromGraph`
============
============
=
This page describes :class:`pytensor.compile.builders.OpFromGraph
This page describes :class:`pytensor.compile.builders.OpFromGraph
<pytensor.compile.builders.OpFromGraph>`, an `Op` constructor that allows one to
<pytensor.compile.builders.OpFromGraph>`, an `Op` constructor that allows one to
...
...
doc/library/graph/index.rst
浏览文件 @
a2c30e1a
...
@@ -18,5 +18,4 @@
...
@@ -18,5 +18,4 @@
features
features
op
op
type
type
params_type
utils
utils
doc/library/graph/params_type.rst
deleted
100644 → 0
浏览文件 @
b7ac8a08
.. _libdoc_graph_params_type:
=======================================================================
:mod:`pytensor.graph.params_type` -- Wrapper class for :class:`Op` params
=======================================================================
---------
Reference
---------
.. automodule:: pytensor.graph.params_type
:platform: Unix, Windows
:synopsis: Wrapper class for op params
:members:
:member-order: bysource
.. moduleauthor:: LISA
doc/library/index.rst
浏览文件 @
a2c30e1a
...
@@ -19,7 +19,6 @@ Modules
...
@@ -19,7 +19,6 @@ Modules
config
config
d3viz/index
d3viz/index
graph/index
graph/index
gpuarray/index
gradient
gradient
misc/pkl_utils
misc/pkl_utils
printing
printing
...
...
doc/library/sandbox/index.rst
浏览文件 @
a2c30e1a
...
@@ -14,4 +14,3 @@
...
@@ -14,4 +14,3 @@
:maxdepth: 1
:maxdepth: 1
linalg
linalg
neighbours
doc/library/tensor/basic.rst
浏览文件 @
a2c30e1a
...
@@ -557,6 +557,7 @@ them perfectly, but a `dscalar` otherwise.
...
@@ -557,6 +557,7 @@ them perfectly, but a `dscalar` otherwise.
.. method:: astype(dtype)
.. method:: astype(dtype)
.. method:: take(indices, axis=None, mode='raise')
.. method:: take(indices, axis=None, mode='raise')
.. method:: copy()
.. method:: copy()
:noindex:
Return a new symbolic variable that is a copy of the variable. Does not copy the tag.
Return a new symbolic variable that is a copy of the variable. Does not copy the tag.
...
@@ -667,11 +668,7 @@ dimensions, see :meth:`_tensor_py_operators.dimshuffle`.
...
@@ -667,11 +668,7 @@ dimensions, see :meth:`_tensor_py_operators.dimshuffle`.
>>> pytensor.tensor.shape_padaxis(tensor, axis=-1)
>>> pytensor.tensor.shape_padaxis(tensor, axis=-1)
InplaceDimShuffle{0,1,2,x}.0
InplaceDimShuffle{0,1,2,x}.0
.. autofunction:: unbroadcast(x, *axes)
.. autofunction:: specify_shape(x, shape)
.. autofunction:: addbroadcast(x, *axes)
.. autofunction:: patternbroadcast(x, broadcastable)
.. function:: flatten(x, ndim=1)
.. function:: flatten(x, ndim=1)
...
...
doc/sandbox/sparse.rst
浏览文件 @
a2c30e1a
...
@@ -120,7 +120,7 @@ Misc
...
@@ -120,7 +120,7 @@ Misc
The sparse equivalent of `dmatrix` is `csc_matrix` and `csr_matrix`.
The sparse equivalent of `dmatrix` is `csc_matrix` and `csr_matrix`.
:class:`~pytensor.sparse.basic.Dot` vs. :class:`~pytensor.sparse.basic.StructuredDot`
:class:`~pytensor.sparse.basic.Dot` vs. :class:`~pytensor.sparse.basic.StructuredDot`
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
----
Often when you use a sparse matrix it is because there is a meaning to the
Often when you use a sparse matrix it is because there is a meaning to the
structure of non-zeros. The gradient on terms outside that structure
structure of non-zeros. The gradient on terms outside that structure
...
...
doc/troubleshooting.rst
浏览文件 @
a2c30e1a
...
@@ -16,7 +16,7 @@ Here are Linux troubleshooting instructions. There is a specific `MacOS`_ sectio
...
@@ -16,7 +16,7 @@ Here are Linux troubleshooting instructions. There is a specific `MacOS`_ sectio
.. _network_error_proxy:
.. _network_error_proxy:
Why do I get a network error when I install PyTensor
Why do I get a network error when I install PyTensor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^
If you are behind a proxy, you must do some extra configuration steps
If you are behind a proxy, you must do some extra configuration steps
before starting the installation. You must set the environment
before starting the installation. You must set the environment
...
@@ -69,7 +69,7 @@ large enough.
...
@@ -69,7 +69,7 @@ large enough.
.. _float64_output:
.. _float64_output:
pytensor.function returns a float64 when the inputs are float32 and int{32, 64}
pytensor.function returns a float64 when the inputs are float32 and int{32, 64}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^
It should be noted that using float32 and int{32, 64} together
It should be noted that using float32 and int{32, 64} together
inside a function would provide float64 as output.
inside a function would provide float64 as output.
...
@@ -80,7 +80,7 @@ To help you find where float64 are created, see the
...
@@ -80,7 +80,7 @@ To help you find where float64 are created, see the
.. _test_pytensor:
.. _test_pytensor:
How to test that PyTensor works properly
How to test that PyTensor works properly
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^
An easy way to check something that could be wrong is by making sure ``PYTENSOR_FLAGS``
An easy way to check something that could be wrong is by making sure ``PYTENSOR_FLAGS``
have the desired values as well as the ``~/.pytensorrc``
have the desired values as well as the ``~/.pytensorrc``
...
...
doc/tutorial/profiling.rst
浏览文件 @
a2c30e1a
...
@@ -27,6 +27,7 @@ of the following two options:
...
@@ -27,6 +27,7 @@ of the following two options:
2. Pass the argument :attr:`profile=True` to the function :func:`pytensor.function
2. Pass the argument :attr:`profile=True` to the function :func:`pytensor.function
<function.function>` and then call :attr:`f.profile.summary()` for a single
<function.function>` and then call :attr:`f.profile.summary()` for a single
function.
function.
- Use this option when you want to profile not all the
- Use this option when you want to profile not all the
functions but only one or more specific function(s).
functions but only one or more specific function(s).
- You can also combine the profile results of many functions:
- You can also combine the profile results of many functions:
...
...
environment.yml
浏览文件 @
a2c30e1a
...
@@ -31,7 +31,7 @@ dependencies:
...
@@ -31,7 +31,7 @@ dependencies:
-
pytest-cov
-
pytest-cov
-
pytest-xdist
-
pytest-xdist
# For building docs
# For building docs
-
sphinx>=
1.3
-
sphinx>=
5.1.0
-
sphinx_rtd_theme
-
sphinx_rtd_theme
-
pygments
-
pygments
-
pydot
-
pydot
...
...
pytensor/graph/op.py
浏览文件 @
a2c30e1a
...
@@ -356,6 +356,8 @@ class Op(MetaObject):
...
@@ -356,6 +356,8 @@ class Op(MetaObject):
grads
grads
The gradients with respect to each `Variable` in `inputs`.
The gradients with respect to each `Variable` in `inputs`.
References
----------
.. [1] Giles, Mike. 2008. “An Extended Collection of Matrix Derivative Results for Forward and Reverse Mode Automatic Differentiation.”
.. [1] Giles, Mike. 2008. “An Extended Collection of Matrix Derivative Results for Forward and Reverse Mode Automatic Differentiation.”
"""
"""
...
...
pytensor/graph/rewriting/basic.py
浏览文件 @
a2c30e1a
pytensor/misc/pkl_utils.py
浏览文件 @
a2c30e1a
...
@@ -47,6 +47,8 @@ class StripPickler(Pickler):
...
@@ -47,6 +47,8 @@ class StripPickler(Pickler):
Example
Example
-------
-------
..code-block:: python
fn_args = dict(inputs=inputs,
fn_args = dict(inputs=inputs,
outputs=outputs,
outputs=outputs,
updates=updates)
updates=updates)
...
@@ -54,7 +56,6 @@ class StripPickler(Pickler):
...
@@ -54,7 +56,6 @@ class StripPickler(Pickler):
with open(dest_pkl, 'wb') as f:
with open(dest_pkl, 'wb') as f:
strip_pickler = StripPickler(f, protocol=-1)
strip_pickler = StripPickler(f, protocol=-1)
strip_pickler.dump(fn_args)
strip_pickler.dump(fn_args)
"""
"""
def
__init__
(
self
,
file
,
protocol
=
0
,
extra_tag_to_remove
=
None
):
def
__init__
(
self
,
file
,
protocol
=
0
,
extra_tag_to_remove
=
None
):
...
...
pytensor/tensor/elemwise.py
浏览文件 @
a2c30e1a
...
@@ -1758,7 +1758,7 @@ def scalar_elemwise(*symbol, nfunc=None, nin=None, nout=None, symbolname=None):
...
@@ -1758,7 +1758,7 @@ def scalar_elemwise(*symbol, nfunc=None, nin=None, nout=None, symbolname=None):
)
)
if
getattr
(
symbol
,
"__doc__"
):
if
getattr
(
symbol
,
"__doc__"
):
rval
.
__doc__
=
symbol
.
__doc__
+
"
\n
"
+
rval
.
__doc__
rval
.
__doc__
=
symbol
.
__doc__
+
"
\n
\n
"
+
rval
.
__doc__
# for the meaning of this see the ./epydoc script
# for the meaning of this see the ./epydoc script
# it makes epydoc display rval as if it were a function, not an object
# it makes epydoc display rval as if it were a function, not an object
...
...
pytensor/tensor/math.py
浏览文件 @
a2c30e1a
...
@@ -1442,18 +1442,18 @@ def betainc(a, b, x):
...
@@ -1442,18 +1442,18 @@ def betainc(a, b, x):
@scalar_elemwise
@scalar_elemwise
def
real
(
z
):
def
real
(
z
):
"""Return real component of complex-valued tensor `z`"""
"""Return real component of complex-valued tensor `z`
.
"""
_tensor_py_operators
.
real
=
property
(
real
)
_tensor_py_operators
.
real
=
property
(
real
,
doc
=
real
.
__doc__
)
@scalar_elemwise
@scalar_elemwise
def
imag
(
z
):
def
imag
(
z
):
"""Return imaginary component of complex-valued tensor `z`"""
"""Return imaginary component of complex-valued tensor `z`
.
"""
_tensor_py_operators
.
imag
=
property
(
imag
)
_tensor_py_operators
.
imag
=
property
(
imag
,
doc
=
imag
.
__doc__
)
@scalar_elemwise
@scalar_elemwise
...
...
pytensor/tensor/rewriting/math.py
浏览文件 @
a2c30e1a
r"""Rewrites for the `Op`\s in `pytensor.tensor.math`."""
r"""Rewrites for the `Op`\s in
:mod:
`pytensor.tensor.math`."""
import
itertools
import
itertools
import
operator
import
operator
...
...
pytensor/tensor/var.py
浏览文件 @
a2c30e1a
...
@@ -654,13 +654,13 @@ class _tensor_py_operators:
...
@@ -654,13 +654,13 @@ class _tensor_py_operators:
__rmatmul__
=
__rdot__
__rmatmul__
=
__rdot__
def
sum
(
self
,
axis
=
None
,
dtype
=
None
,
keepdims
=
False
,
acc_dtype
=
None
):
def
sum
(
self
,
axis
=
None
,
dtype
=
None
,
keepdims
=
False
,
acc_dtype
=
None
):
"""See `pytensor.tensor.math.sum`."""
"""See
:func:
`pytensor.tensor.math.sum`."""
return
at
.
math
.
sum
(
return
at
.
math
.
sum
(
self
,
axis
=
axis
,
dtype
=
dtype
,
keepdims
=
keepdims
,
acc_dtype
=
acc_dtype
self
,
axis
=
axis
,
dtype
=
dtype
,
keepdims
=
keepdims
,
acc_dtype
=
acc_dtype
)
)
def
prod
(
self
,
axis
=
None
,
dtype
=
None
,
keepdims
=
False
,
acc_dtype
=
None
):
def
prod
(
self
,
axis
=
None
,
dtype
=
None
,
keepdims
=
False
,
acc_dtype
=
None
):
"""See `pytensor.tensor.math.prod`."""
"""See
:func:
`pytensor.tensor.math.prod`."""
return
at
.
math
.
prod
(
return
at
.
math
.
prod
(
self
,
axis
=
axis
,
dtype
=
dtype
,
keepdims
=
keepdims
,
acc_dtype
=
acc_dtype
self
,
axis
=
axis
,
dtype
=
dtype
,
keepdims
=
keepdims
,
acc_dtype
=
acc_dtype
)
)
...
@@ -681,73 +681,73 @@ class _tensor_py_operators:
...
@@ -681,73 +681,73 @@ class _tensor_py_operators:
return
y
return
y
def
mean
(
self
,
axis
=
None
,
dtype
=
None
,
keepdims
=
False
,
acc_dtype
=
None
):
def
mean
(
self
,
axis
=
None
,
dtype
=
None
,
keepdims
=
False
,
acc_dtype
=
None
):
"""See `pytensor.tensor.math.mean`."""
"""See
:func:
`pytensor.tensor.math.mean`."""
return
at
.
math
.
mean
(
return
at
.
math
.
mean
(
self
,
axis
=
axis
,
dtype
=
dtype
,
keepdims
=
keepdims
,
acc_dtype
=
acc_dtype
self
,
axis
=
axis
,
dtype
=
dtype
,
keepdims
=
keepdims
,
acc_dtype
=
acc_dtype
)
)
def
var
(
self
,
axis
=
None
,
ddof
=
0
,
keepdims
=
False
,
corrected
=
False
):
def
var
(
self
,
axis
=
None
,
ddof
=
0
,
keepdims
=
False
,
corrected
=
False
):
"""See `pytensor.tensor.math.var`."""
"""See
:func:
`pytensor.tensor.math.var`."""
return
at
.
math
.
var
(
return
at
.
math
.
var
(
self
,
axis
=
axis
,
ddof
=
ddof
,
keepdims
=
keepdims
,
corrected
=
corrected
self
,
axis
=
axis
,
ddof
=
ddof
,
keepdims
=
keepdims
,
corrected
=
corrected
)
)
def
std
(
self
,
axis
=
None
,
ddof
=
0
,
keepdims
=
False
,
corrected
=
False
):
def
std
(
self
,
axis
=
None
,
ddof
=
0
,
keepdims
=
False
,
corrected
=
False
):
"""See `pytensor.tensor.math.std`."""
"""See
:func:
`pytensor.tensor.math.std`."""
return
at
.
math
.
std
(
return
at
.
math
.
std
(
self
,
axis
=
axis
,
ddof
=
ddof
,
keepdims
=
keepdims
,
corrected
=
corrected
self
,
axis
=
axis
,
ddof
=
ddof
,
keepdims
=
keepdims
,
corrected
=
corrected
)
)
def
min
(
self
,
axis
=
None
,
keepdims
=
False
):
def
min
(
self
,
axis
=
None
,
keepdims
=
False
):
"""See `pytensor.tensor.math.min`."""
"""See
:func:
`pytensor.tensor.math.min`."""
return
at
.
math
.
min
(
self
,
axis
,
keepdims
=
keepdims
)
return
at
.
math
.
min
(
self
,
axis
,
keepdims
=
keepdims
)
def
max
(
self
,
axis
=
None
,
keepdims
=
False
):
def
max
(
self
,
axis
=
None
,
keepdims
=
False
):
"""See `pytensor.tensor.math.max`."""
"""See
:func:
`pytensor.tensor.math.max`."""
return
at
.
math
.
max
(
self
,
axis
,
keepdims
=
keepdims
)
return
at
.
math
.
max
(
self
,
axis
,
keepdims
=
keepdims
)
def
argmin
(
self
,
axis
=
None
,
keepdims
=
False
):
def
argmin
(
self
,
axis
=
None
,
keepdims
=
False
):
"""See `pytensor.tensor.math.argmin`."""
"""See
:func:
`pytensor.tensor.math.argmin`."""
return
at
.
math
.
argmin
(
self
,
axis
,
keepdims
=
keepdims
)
return
at
.
math
.
argmin
(
self
,
axis
,
keepdims
=
keepdims
)
def
argmax
(
self
,
axis
=
None
,
keepdims
=
False
):
def
argmax
(
self
,
axis
=
None
,
keepdims
=
False
):
"""See `pytensor.tensor.math.argmax`."""
"""See
:func:
`pytensor.tensor.math.argmax`."""
return
at
.
math
.
argmax
(
self
,
axis
,
keepdims
=
keepdims
)
return
at
.
math
.
argmax
(
self
,
axis
,
keepdims
=
keepdims
)
def
nonzero
(
self
,
return_matrix
=
False
):
def
nonzero
(
self
,
return_matrix
=
False
):
"""See `pytensor.tensor.basic.nonzero`."""
"""See
:func:
`pytensor.tensor.basic.nonzero`."""
return
at
.
nonzero
(
self
,
return_matrix
=
return_matrix
)
return
at
.
nonzero
(
self
,
return_matrix
=
return_matrix
)
def
nonzero_values
(
self
):
def
nonzero_values
(
self
):
"""See `pytensor.tensor.basic.nonzero_values`."""
"""See
:func:
`pytensor.tensor.basic.nonzero_values`."""
return
at
.
nonzero_values
(
self
)
return
at
.
nonzero_values
(
self
)
def
sort
(
self
,
axis
=-
1
,
kind
=
"quicksort"
,
order
=
None
):
def
sort
(
self
,
axis
=-
1
,
kind
=
"quicksort"
,
order
=
None
):
"""See `pytensor.tensor.sort.sort`."""
"""See
:func:
`pytensor.tensor.sort.sort`."""
return
at
.
sort
(
self
,
axis
,
kind
,
order
)
return
at
.
sort
(
self
,
axis
,
kind
,
order
)
def
argsort
(
self
,
axis
=-
1
,
kind
=
"quicksort"
,
order
=
None
):
def
argsort
(
self
,
axis
=-
1
,
kind
=
"quicksort"
,
order
=
None
):
"""See `pytensor.tensor.sort.argsort`."""
"""See
:func:
`pytensor.tensor.sort.argsort`."""
from
pytensor.tensor.sort
import
argsort
from
pytensor.tensor.sort
import
argsort
return
argsort
(
self
,
axis
,
kind
,
order
)
return
argsort
(
self
,
axis
,
kind
,
order
)
def
clip
(
self
,
a_min
,
a_max
):
def
clip
(
self
,
a_min
,
a_max
):
"See `pytensor.tensor.math.clip`."
"See
:func:
`pytensor.tensor.math.clip`."
return
at
.
math
.
clip
(
self
,
a_min
,
a_max
)
return
at
.
math
.
clip
(
self
,
a_min
,
a_max
)
def
conj
(
self
):
def
conj
(
self
):
"""See `pytensor.tensor.math.conj`."""
"""See
:func:
`pytensor.tensor.math.conj`."""
return
at
.
math
.
conj
(
self
)
return
at
.
math
.
conj
(
self
)
conjugate
=
conj
conjugate
=
conj
def
repeat
(
self
,
repeats
,
axis
=
None
):
def
repeat
(
self
,
repeats
,
axis
=
None
):
"""See `pytensor.tensor.basic.repeat`."""
"""See
:func:
`pytensor.tensor.basic.repeat`."""
return
at
.
extra_ops
.
repeat
(
self
,
repeats
,
axis
)
return
at
.
extra_ops
.
repeat
(
self
,
repeats
,
axis
)
def
round
(
self
,
mode
=
None
):
def
round
(
self
,
mode
=
None
):
"""See `pytensor.tensor.math.round`."""
"""See
:func:
`pytensor.tensor.math.round`."""
return
at
.
math
.
round
(
self
,
mode
)
return
at
.
math
.
round
(
self
,
mode
)
def
trace
(
self
):
def
trace
(
self
):
...
@@ -775,12 +775,12 @@ class _tensor_py_operators:
...
@@ -775,12 +775,12 @@ class _tensor_py_operators:
return
at
.
extra_ops
.
searchsorted
(
self
,
v
,
side
,
sorter
)
return
at
.
extra_ops
.
searchsorted
(
self
,
v
,
side
,
sorter
)
def
ptp
(
self
,
axis
=
None
):
def
ptp
(
self
,
axis
=
None
):
"""See `pytensor.tensor.math.ptp`."""
"""See
:func:
`pytensor.tensor.math.ptp`."""
return
at
.
math
.
ptp
(
self
,
axis
)
return
at
.
math
.
ptp
(
self
,
axis
)
def
swapaxes
(
self
,
axis1
,
axis2
):
def
swapaxes
(
self
,
axis1
,
axis2
):
"""See `pytensor.tensor.basic.swapaxes`.
"""See
:func:
`pytensor.tensor.basic.swapaxes`.
If a matrix is provided with the right axes, its transpose
If a matrix is provided with the right axes, its transpose
will be returned.
will be returned.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论