Python wie man eine Reihe von Einsen macht
# Basic syntax:
np.ones((number_rows, number_cols), dtype=int)
# Example usage:
import numpy as np
np.ones((5, 3), dtype=int)
array([[1, 1, 1],
[1, 1, 1],
[1, 1, 1],
[1, 1, 1],
[1, 1, 1]])
# Note, use np.zeros to create an array of zeros
Charles-Alexandre Roy