相当于掩码数组的 np.array split
numpy.ma.split_array
不存在。
因此,如果 arr 是掩码数组,以下代码是否按预期工作?
np.array_split(arr, multiprocessing.cpu_count())
如果没有,我应该如何定义函数 split_masked_array 来实现类似的行为?
numpy.ma.split_array
does not exist.
Consequently, does the following code works as intended if arr
is a masked array?
np.array_split(arr, multiprocessing.cpu_count())
If not, how should I define a function split_masked_array
to achieve similar behavior?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不知道为什么你不尝试一下。似乎可行,但很难确定,因为您没有提供 最小可重现示例,所以我不不知道“按预期工作”是什么意思。
Not sure why you didn't just try. Seems to work, but it's hard to tell for sure since you didn't provide a minimal reproducible example so I don't know what "works as intended" means.