阅读背景:

如何创建一个不规则间隔的numpy数组切片的视图?

来源:互联网 

In the following case:

在以下情况中:

a = np.zeros(35)
# create a view
av = a[3:10]
assert np.may_share_memory(a, av)
some_ind = array([0,5,6,24])
# trying to create a second view of another slice of a 
av2 = a[some_ind] # or a[np.where(some_ind)]
assert np.may_share_memory(a, av2) # raise AssertionError
a = np.zeros



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: