You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
164 B

4 years ago
  1. import numpy as np
  2. a = np.zeros((2, 3))
  3. print("a =", a)
  4. b = np.ones((2, 2))
  5. print("b =", b)
  6. c = np.full((3, 2), 3)
  7. print("c =", c)
  8. d = np.eye(2)
  9. print("d =", d)