本文整理汇总了Python中sympy.Symbol.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Symbol.__init__方法的具体用法?Python Symbol.__init__怎么用?Python Symbol.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sympy.Symbol
的用法示例。
在下文中一共展示了Symbol.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from sympy import Symbol [as 别名]
# 或者: from sympy.Symbol import __init__ [as 别名]
def __init__(self, data, step_size=1.0):
"""A continuous scalar data source from a discrete time series.
Time series data points are linearly interpolated in order to generate
values for points not present in the time series. The time series is
wrapped in order to generate an infinite sequence.
:param data: iterable of scalar values
:param step_size: number of LB iterations corresponding to one unit in
the time series (i.e. time distance between two neighboring points).
"""
Symbol.__init__("unused")
if type(data) is list or type(data) is tuple:
data = np.float64(data)
# Copy here is necessary so that the caller doesn't accidentally change
# the underlying array later. Also, we need the array to be C-contiguous
# (for __hash__ below), which might not be the case if it's a view.
self._data = data.copy()
self._step_size = step_size
# To be set later by the geometry encoder class. This is necessary due
# to how the printing system in Sympy works (see _ccode below).
self._offset = None
示例2: __init__
# 需要导入模块: from sympy import Symbol [as 别名]
# 或者: from sympy.Symbol import __init__ [as 别名]
def __init__(self, name, dim = 4, up = True):
Symbol.__init__(self, name)
#self._args.extend([dim,up])
self._name = name
self._dim = dim
self._up = up
示例3: __init__
# 需要导入模块: from sympy import Symbol [as 别名]
# 或者: from sympy.Symbol import __init__ [as 别名]
def __init__(self, name, comment=None):
Symbol.__init__(name)
self.comment = comment
示例4: __init__
# 需要导入模块: from sympy import Symbol [as 别名]
# 或者: from sympy.Symbol import __init__ [as 别名]
def __init__(self, label, dim=None, **kw_args):
Symbol.__init__(label, **kw_args)
self.dim = dim