You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DataFrameInternal uses deprecated class Matrix #44
Array2d and matrix are not the same. In fact long time ago I made the mistake to rename Array2d into matrix but it was missing many of the matrix operation.
Ahhh... the matrix-array debate. I was part of the team that designed NumPy in 1994, and we already had the debate back then. And it comes up again and again. In my opinion, there are two workable approaches:
The APL way: there are only arrays. Matrix operations are expressed in terms of arrays, requiring some adaptation for people coming from a maths-matrix background.
Arrays and matrices as separate classes, which may share implementation details but are not substitutable (in particular, none is a subclass of the other).
The second approach is probably easier to get used to for most people, but ends up requiring tons of conversions. My personal preference is the array-only approach.
Are there any plans to work in these issues in Pharo? For now, all I see in my Pharo 7 image is that Matrix is an empty and deprecated subclass of Array2D.
Array2d is an array 2d :) so we can understand what it is. Now if someone define on array2d or array2d like class the functions required for manipulating things like a matrix then why not :)
But in Matrix we got a Matrix with an Array2D api so I think that it was the worse case scenario and it was my mistake because back then nobody needed the Matrix/vector API.
In Besset code he needed it and created it.
Now Pharo is one thing and the libraries another. Ideally we want in Pharo the least amount of classes and that the user can load what it wants. This is why I started to packaged, clean,... some lost collections that were not used in the image without tests too on my Containers-* projects.
So I encourage you to push and gets young guys to build nice libraries. This is what we are doing with Oleksandr.
I agree with Stéphane, that we should not introduce in Pharo Matrix class. Matrix can be implemented as arrays but not only if they are spare matrices for example. The picture is even more complex if we want to introduce tensors that are multi-dimensional matrices.
For now I have replaced the deprecated Matrix with Array2D. For the future release of DataFrame we will have to experiment with several data structures and choose the fastest one.
Activity
Ducasse commentedon Feb 1, 2019
Array2d and matrix are not the same. In fact long time ago I made the mistake to rename Array2d into matrix but it was missing many of the matrix operation.
Stef
khinsen commentedon Feb 3, 2019
Ahhh... the matrix-array debate. I was part of the team that designed NumPy in 1994, and we already had the debate back then. And it comes up again and again. In my opinion, there are two workable approaches:
The second approach is probably easier to get used to for most people, but ends up requiring tons of conversions. My personal preference is the array-only approach.
Are there any plans to work in these issues in Pharo? For now, all I see in my Pharo 7 image is that
Matrixis an empty and deprecated subclass ofArray2D.Ducasse commentedon Feb 3, 2019
Array2d is an array 2d :) so we can understand what it is. Now if someone define on array2d or array2d like class the functions required for manipulating things like a matrix then why not :)
But in Matrix we got a Matrix with an Array2D api so I think that it was the worse case scenario and it was my mistake because back then nobody needed the Matrix/vector API.
In Besset code he needed it and created it.
Now Pharo is one thing and the libraries another. Ideally we want in Pharo the least amount of classes and that the user can load what it wants. This is why I started to packaged, clean,... some lost collections that were not used in the image without tests too on my Containers-* projects.
So I encourage you to push and gets young guys to build nice libraries. This is what we are doing with Oleksandr.
SergeStinckwich commentedon Feb 3, 2019
I agree with Stéphane, that we should not introduce in Pharo Matrix class. Matrix can be implemented as arrays but not only if they are spare matrices for example. The picture is even more complex if we want to introduce tensors that are multi-dimensional matrices.
SergeStinckwich commentedon Feb 3, 2019
So I guess we should use Array2D instead of Matrix class.
olekscode commentedon Feb 23, 2019
For now I have replaced the deprecated Matrix with Array2D. For the future release of DataFrame we will have to experiment with several data structures and choose the fastest one.