Updated documentation

上级 b27fe4b2
"""A Result to store numpy.ndarray with basic accompanying Ops""" """A L{Result} to store L{numpy.ndarray} with basic accompanying L{Op}s"""
import sys # for sys.maxint import sys # for sys.maxint
import inspect import inspect
...@@ -17,12 +17,12 @@ import scalar as scal ...@@ -17,12 +17,12 @@ import scalar as scal
class Tensor(BaseTensor): class Tensor(BaseTensor):
""" """
This subclass of BaseTensor provides operator overloading using implementations This subclass of L{BaseTensor} provides operator overloading using
of Tensor operations contained in this file. implementations of L{Tensor} operations contained in this file.
Operators: Operators:
- most numeric operators are overloaded (to return Ops that perform the - most numeric operators are overloaded (to return L{Op}s that
corresponding calculation) perform the corresponding calculation)
""" """
#UNARY #UNARY
...@@ -72,7 +72,7 @@ s2t.Tensor = Tensor ...@@ -72,7 +72,7 @@ s2t.Tensor = Tensor
# alternate Tensor constructor # alternate Tensor constructor
def astensor(data, broadcastable=None, role=None, name=None): def astensor(data, broadcastable=None, role=None, name=None):
"""Return a Tensor containing given data""" """Return a L{Tensor} containing given data"""
if isinstance(data, Tensor) and broadcastable is None and role is None and name is None: if isinstance(data, Tensor) and broadcastable is None and role is None and name is None:
return data return data
data = numpy.asarray(data) data = numpy.asarray(data)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论