import random


def get_vectors_from_model(w2v_model, sample_size):
    """Return a numpy array of size sample_size with randomly selected vectors.
    """
    vectors = []
    if sample_size > 0:
        words = random.sample(w2v_model.index2word, k=sample_size)
    else:
        words = w2v_model.vocab.keys()
    return w2v_model[words]