0

I have this:

matriz:
[(79.754599999999996, 100.0),
(95.754599999999996, 100.0),
(79.754599999999996, 0),
(100.0, 100.0)]

Matriz is a list of list, and I want to convert it to an array. Currently i use this to get what i want:

matriz3 = np.array([matriz[0],matriz[1],matriz[2],matriz[3]])
matriz3

array([[  79.7546,  100.    ],
       [  95.7546,  100.    ],
       [  79.7546,    0.    ],
       [ 100.    ,  100.    ]])

How can i do this automaticly and more efficiently?

0

1 Answer 1

2

Just use array:

matriz3 = np.array(matriz)
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! It solved my problem! :D

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.