crystalla icon indicating copy to clipboard operation
crystalla copied to clipboard

added ndarray class

Open MatthiasRMS opened this issue 8 years ago • 4 comments

So this is were I am. A Ndarray class, supporting most of the methods you defined for matrices when the array is 2D (there are a few that still need to be added), and basic numpy's methods for ndarrays (reshape, broadcasting, sum, bool comparison etc). As you advised, I use column major order.

There are some differences with the current Matrix class (shape, dot product instead of *) since I've tried to stick with numpy's behaviour most of the time.

Works fine with 1D and 2D (see specs), not yet with more dimensions. I've been able to replicate the numpy part of this course intro using this ndarray class.

Let me know what you think, what should be improved, if you have any design advices etc !

MatthiasRMS avatar Dec 27 '16 13:12 MatthiasRMS

❤️ This is great Matthias, thank you so much! Give me a couple of days to review it and I'll merge it.

mverzilli avatar Dec 29 '16 12:12 mverzilli

I've added a few more stuffs. I keep adding elements while coding gradient descent, since I keep finding useful functions/features. If you see any improvements that could be made, just tell me and I can correct it. Especially performance improvements etc :-)

MatthiasRMS avatar Jan 02 '17 20:01 MatthiasRMS

As regards:

There are some differences with the current Matrix class (shape, dot product instead of *) since I've tried to stick with numpy's behaviour most of the time.

Big 👍 from my side

mverzilli avatar Jan 06 '17 22:01 mverzilli

Sounds good, I'll fix those over the weekend 👍

MatthiasRMS avatar Jan 07 '17 16:01 MatthiasRMS