我有一个过时的 repo,没有什么可添加到我的机器上。我想从 github 拉入最新的稳定分支。
我应该克隆它吗?我不知道。
例如,如果我有以下课程
class Part(object):
def __init__(self,part_number,description,rev=None,color=None):
self.dims = {}
self.dim_id = 0
self.rev = rev
if type(color) is tuple:
self.color=(color[0]/255.,color[1]/255.,color[2]/255.)
else:
self.color = color
def add_dimension(self,description,value,tol,tol_type = 'sym',dwg_sheet = None, dwg_zone = None,quality = 3):
self.dims[description] = Dimension(description=description,part=self,value=value,tol=tol,tol_type=tol_type,quality=quality,dwg_sheet=None,dwg_zone=None)
def __getattr__(self, description):
return self.dims[description]
class Dimension(object):
def __init__(self,part,value,tol,tol_type = 'sym', dwg_sheet = None, dwg_zone = None, quality = 3, description = None):
self.value = value
self.part=part
self.tol = tol
self.tol_type = tol_type
self.description = description
self.quality = quality
self.sigma = self.tol/float(quality)
def …Run Code Online (Sandbox Code Playgroud) 我有一个MutableDenseMatrix , Q. theta1并且theta2属于SymPy类型symbol.
In[12]: Q
Out[12]: [cos(theta1), -sin(theta1), 0, 0]
[sin(theta1), cos(theta1), 0, 0]
[ 0, 0, 1, 980]
[ 0, 0, 0, 1]
Run Code Online (Sandbox Code Playgroud)
当我打电话给逆时,我得到:
In[13]: Q_inv=Q.inv()
Out[13]: [-sin(theta1)**2/cos(theta1) + 1/cos(theta1), sin(theta1), 0, 0]
[ -sin(theta1), cos(theta1), 0, 0]
[ 0, 0, 1, -980]
[ 0, 0, 0, 1]
Run Code Online (Sandbox Code Playgroud)
当我应该得到的是:
Out[X]: [cos(theta1), sin(theta1), 0, 0]
[-sin(theta1), cos(theta1), 0, 0]
[ 0, 0, 1, -980]
[ 0, 0, 0, 1]
Run Code Online (Sandbox Code Playgroud)
关于这里可能出现什么问题的任何想法?
我有三个包含测试期间记录的数据的pandas数据帧.一帧用于温度,另一帧用于真空,另一帧用于电压.
数据是独立捕获的,因此每帧的时间值不对齐.只有偶尔来自一帧的时间戳在另一帧中具有重复.
我想要做的是将这些组合成一个数据帧,然后插入缺失值,以便我有一个完整的数据帧.
我是大熊猫的新手,一直在四处寻找,但我不觉得自己到处都是,或者我是否走在正确的道路上.