【发布时间】:2020-04-16 03:25:22
【问题描述】:
我有一个 1D 数组,我想将它与 3D 数组的第一个轴相乘。
例如,我的 1D 数组的长度为 710,我想仅将它与长度也为 710 的 3D 数组的第一个轴相乘。我不想要它与其他两个轴相乘(因为它们的大小不同,我得到一个错误)。
我该怎么做?
下面是示例代码:
data = sla_standard[:,:,:]
window = w
print(window.shape)
print(data.shape)
#GOAL: multiply the window with the first axis of my data array
what is printed from console:
(710,)
(710, 81, 320)
【问题讨论】:
标签: python arrays function multidimensional-array