-3

If I have a ndarray can I merge them into a 1D array?

Example:

v = [
  [1 2],
  [3 4]
]

into

v = [1 2 3 4]
FLAK-ZOSO
  • 3,873
  • 4
  • 8
  • 28
r.r.
  • 5
  • 2

1 Answers1

1
v = v.flatten()

Check also this, that is the same thing applied to Python's lists

FLAK-ZOSO
  • 3,873
  • 4
  • 8
  • 28