[[+content_image]]
L
L
Lamont2222021-11-23 18:39:40
Python
Lamont222, 2021-11-23 18:39:40

How to pair elements of a two-dimensional array?

Hi there 2 array
A = [[97.27207794 105.75735931 114.24264069 122.72792206]
[97.27207794 105.75735931 114.24264069 122.72792206]
[97.27207794 105.75735931 114.24264069 122.72792206]
[97.27207794 105.75735931 114.24264069 122.72792206]]
B = [[97.27207794 97.27207794 97.27207794 97.27207794]
[105.75735931 105.75735931 105.75735931 105.75735931]
[114.24264069 114.24264069 114.24264069 114.24264069]
[122.72792206 122.72792206 122.72792206 122.72792206]]

How to combine in a couple of arrays A and B, [97.272077.27207794] [105.75733331.220120

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
W
Wataru, 2021-11-23
@wataru

Do you need an array of arrays? Or will tuples do? So there is zip .
And then you can use np.asarray and map to convert the touples array into an array of arrays.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question