Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def randomize_vectors(tweet_vectors):
:param tweet_vectors:
:return: randomized_tweet_vectors: a Numpy array of tweet vectors that have
been randomly shuffled
#Initialize randomized tweet vectors
randomized_tweet_vectors = np.zeros((tweet_vectors.shape[0], tweet_vectors.shape[1]), dtype=int)
for x in range(tweet_vectors.shape[0]):
for y in range(tweet_vectors.shape[1]):
randomized_tweet_vectors[x][y] = tweet_vectors[x][y]
return randomized_tweet_vectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment