当前位置: 首页 > news >正文

商户如何做h5商城网站是什么意思合肥网站建设案例

商户如何做h5商城网站是什么意思,合肥网站建设案例,设计网页多少钱,怎么重新运行wordpressTL;DR: 无论如何我可以摆脱我的第二个 for -loop#xff1f;我在2D网格上有一系列时间点 . 为了消除它们位置的快速波动#xff0c;我在一个帧窗口上平均坐标 . 现在在我的情况下#xff0c;它想要包含特定点的帧#xff0c;如果它的行程比 cut_off 值更远 .在第一个 for -…TL;DR: 无论如何我可以摆脱我的第二个 for -loop我在2D网格上有一系列时间点 . 为了消除它们位置的快速波动我在一个帧窗口上平均坐标 . 现在在我的情况下它想要包含特定点的帧如果它的行程比 cut_off 值更远 .在第一个 for -loop中我遍历所有帧并定义移动窗口 . 然后我计算当前帧与移动窗口中每个帧之间的距离 . 在我从所有帧中仅抓取那些位置后 x 和 y 组件的行程都没有超过 cut_off . 现在我想计算移动窗口所有这些选定帧中每个点的平均位置( note: 所选帧的数量可以小于 n_window ) . 这导致我第二个 for -loop . 在这里我迭代所有点并实际 grab 帧中的位置其中当前点没有比 cut_off 传播更远 . 从这些选定的帧中我计算坐标的平均值并将其用作当前帧的新值 .这最后 for -loop减慢了整个处理过程 . 我无法想出一个更好的方法来完成这个计算 . 有什么建议MWE提出评论以澄清 .import numpy as np# Generate a timeseries with 1000 frames, each# containing 50 individual points defined by their# x and y coordinatesn_frames 1000n_points 50n_coordinates 2timeseries np.random.randint(-100, 100, [n_frames, n_points, n_coordinates])# Set window size to 20 framesn_window 20# Distance cut offcut_off 60# Set up empty array to hold resultsavg_data_store np.zeros([n_frames, timeseries.shape[1], 2])# Iterate over all framesfor frame in np.arange(0, n_frames):# Set the frame according to the window size that were looking att_before int(frame - (n_window / 2))t_after int(frame (n_window / 2))# If were trying to access frames below 0, set the lowest one to 0if t_before 0:t_before 0# Trying to access frames that are not in the trajectory, set to last frameif t_after n_frames - 1:t_after n_frames - 1# Grab x and y coordinates for all points in the corresponding windowpos_before timeseries[t_before:frame]pos_after timeseries[frame 1:t_after 1]pos_now timeseries[frame]# Calculate the distance between the current frame and the windows before/afterd_before np.abs(pos_before - pos_now)d_after np.abs(pos_after - pos_now)# Grab indices of framespoints, that are below the cut offarg_before np.argwhere(np.all(d_before cut_off, axis2))arg_after np.argwhere(np.all(d_after cut_off, axis2))# Iterate over all pointsfor i in range(0, timeseries.shape[1]):# Create temp arraytemp_stack pos_now[i]# Grab all frames in which the current point did _not_# travel farther than cut_offall_before arg_before[arg_before[:, 1] i][:, 0]all_after arg_after[arg_after[:, 1] i][:, 0]# Grab the corresponding positions for this points in these framesall_pos_before pos_before[all_before, i]all_pos_after pos_after[all_after, i]# If we have any frames for that point before / after# stack them into the temp arrayif all_pos_before.size 0:temp_stack np.vstack([all_pos_before, temp_stack])if all_pos_after.size 0:temp_stack np.vstack([temp_stack, all_pos_after])# Calculate the moving window average for the selection of framesavg_data_store[frame, i] temp_stack.mean(axis0)
http://www.sadfv.cn/news/198673/

相关文章:

  • 一个网站的优化怎么做南京360推广 网站建设
  • 网站设计的方法佛山seo网站推广
  • 登封市城乡建设路网站网络架构分几层
  • 四川成都私人网站建设百度网站链接
  • 深圳华南城网站建设深圳市住房和城乡和建设局网站
  • 山西建设机械网站个人免费开店的网站
  • 网站如何被搜索引擎收录去韩国用什么地图导航
  • 做用户运营应该关注哪些网站益阳市网站建设
  • 做商城网站的流程销售产品做单页还是网站
  • 深圳做网站比较好天涯郑州开发软件公司
  • 做山西杂粮的网站手机自助建站免费建站平台
  • 那个网站专门做二手衣服佛山手机网站建设
  • 青岛开发区建网站公司灰色词秒收录代发
  • 泰安中商网络做的网站怎么进入网站三大标签设置
  • 摄影网站 蜂鸟建设一个旅游电子商务网站
  • 怎么建立自己的网站免费网站建设保密协议范本
  • 做ppt的软件模板下载网站有哪些国内wordpress例子
  • 公司网站本地如何弄镇江网站建设镇江
  • 利鑫做彩票网站网站备案名字要怎么写
  • 企业在阿里云做网站欧美网站建设
  • 福永网站开发哪些官网用wordpress
  • 网站建设可以在家做吗资源搜索神器
  • 网站设计一般用什么软件东莞网站建设管理
  • linux建设php网站网站建设找什么工作
  • 网站交互怎么做河池公司网站开发价格
  • 网站风格和色调可以做问答的网站
  • 阿里巴巴网站策划书网站排名快速见效的方法
  • 信用中国 网站有那个部门支持建设太平洋电脑网站
  • 网站设计要求 优帮云wordpress用户文档
  • 廊坊电子商务网站建设大型企业网络规划方案