阅读背景:

如何在python中获得一个交替值数组?

来源:互联网 

Simple question here:

简单的问题:

I'm trying to get an array that alternates values (1, -1, 1, -1.....) for a given length. np.repeat just gives me (1, 1, 1, 1,-1, -1,-1, -1). Thoughts?I'm trying to




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

分享到: