#-*- encoding:utf-8 -*- ''' @Author : dingjiawen @Date : 2023/5/22 20:41 @Usage : @Desc : ''' # -*- coding: utf-8 -*- import numpy as np import math import matplotlib.pyplot as plt import pandas as pd '''python 操作符 Method Overloads Call for __init__ 构造函数 X=Class() __del__ 析构函数 对象销毁 __add__ radd,iadd + X+Y,X+=Y __or__ | X|Y,X|=Y __repr__ 打印转换 print X,repr(X) __str__ 打印转换 print X,str(X) __call__ 调用函数 X() __getattr_ 限制 X.undefine __setattr__ 取值 X.any=value __getitem__ 索引 X[key], __len__ 长度 len(X) __cmp__ 比较 X==Y,X1: # self.core=a # d=len(a) # r=[a[0].shape[0]] # subshapes=[] # for i in range(d): # r=r+[a[i].shape[1]] # subshapes=subshapes+[a[i].subshape] # subshape=np.array(subshapes) # self.d=d # self.r=r # self.subshapes=subshapes # return # shape=a.shape if __name__ == '__main__': cms_data_path = r"E:\data\cmsDemo\华能三塘湖项目(一期)_D3-29_Shaft2_径向_25600_加速度g_14.41RPM_20180618003450.csv" cms_data_df = pd.read_csv(cms_data_path, encoding='gbk', header=None) cms_data_df = cms_data_df.values[0] print(cms_data_df.shape) ltcore = lqtt(cms_data_df,(cms_data_df.shape[0]/10,1)) print(ltcore)