当前位置: 首页>>代码示例>>Python>>正文


Python Symbol.__init__方法代码示例

本文整理汇总了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
开发者ID:marcinofulus,项目名称:sailfish,代码行数:27,代码来源:node_type.py

示例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
开发者ID:certik,项目名称:sympy-oldcore,代码行数:8,代码来源:tensors.py

示例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
开发者ID:vikeu,项目名称:sailfish,代码行数:5,代码来源:sym.py

示例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
开发者ID:markdewing,项目名称:derivation_modeling,代码行数:5,代码来源:vector.py


注:本文中的sympy.Symbol.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。