Sudip Das - 10 months ago 67

Python Question

Suppose I have 50 matrix(x1,x2...x50) of images of size 1028x1028. if I print the shape of any one among 50 matrix like this =>

`print(x1.shape)`

It will return (1028,1028).

I want to insert those matrices in an linear array(A) by using numpy or another else . when I Will

`print(A.shape)`

How I will do this??

Answer Source

Ok, I feel strange for having to point that out, but

```
numpy.array([x1,x2,x3,...,x50])
```

will do that.

Also, it's a bad idea to have 50 separate variables `x1`

, `x2`

and so on. Just put them into a list `x`

and address them as `x[0]`

, `x[1]`

, and so on.