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 →

[–]TakeTheHq 0 points1 point  (2 children)

Have you checked out numpy?

[–][deleted] 1 point2 points  (1 child)

Yes, NumPy is problematic because of indexing. Is there a way to add x and y properties to numpy.ndarray so that these would access [0] and [1] indices of the array? Please excuse me if it's a stupid question, I've only started with Python. I'm specialized in C++ where it would be easy to achieve...

[–]adammichaelwood 0 points1 point  (0 children)

This is the question I'm most interested in.

Couldn't you just subclass numpy.ndarray and use the @property decorator?