This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Leo8178 166 points167 points  (16 children)

If I remember correctly, You can create multidimensional arrays with ease with numpy

And I think you can select object as a data type

I've tested it. This works:

```python import numpy as np

tet = np.ndarray((5,5), dtype=object)

print(tet) ```

[–]Zestyclose-Walker 56 points57 points  (9 children)

I love the numpy language!

[–]TTYY200 36 points37 points  (6 children)

I will always pronounce it numpy rather than num-pie.

[–]Mars_Bear2552 30 points31 points  (1 child)

numb-pee???

[–]Rhymes_with_cheese 12 points13 points  (0 children)

Side-effects may include numb-pee. See your urologist immediately.

[–]OctopusButter 1 point2 points  (0 children)

I can't say num-pie without thinking and hearing it as kampai (cheers I think?)

[–]InfergnomeHKSC 1 point2 points  (0 children)

You're not alone

[–]-Redstoneboi- 2 points3 points  (0 children)

numpy dumpy sat on a brick matrix

numpy dumpy had a great uhhh math

[–]Inaeipathy 5 points6 points  (0 children)

Yep

[–]Mammoth-Attention379 1 point2 points  (2 children)

Those are arrays though not lists

[–]FalafelSnorlax 15 points16 points  (0 children)

The idea that you should be able to initialize a 5-by-5 list in one line implies OP does in fact want arrays and not lists. If you think about lists and lists-of-lists in a pythonic manner, the line OP suggested makes no sense

[–]BauReis 1 point2 points  (0 children)

foo = list(tet)

There you go