Skip to content

DataFrameInternal uses deprecated class Matrix #44

Closed

Description

@khinsen

The Matrix class has been deprecated in Pharo 7. Better use Array2D ?

Activity

  1. Ducasse commented on Feb 1, 2019

    @Ducasse

    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

  2. khinsen commented on Feb 3, 2019

    @khinsen
    Author

    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.

  3. Ducasse commented on Feb 3, 2019

    @Ducasse

    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.

  4. SergeStinckwich commented on Feb 3, 2019

    @SergeStinckwich
    Member

    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.

  5. SergeStinckwich commented on Feb 3, 2019

    @SergeStinckwich
    Member

    So I guess we should use Array2D instead of Matrix class.

  6. self-assigned this
    on Feb 19, 2019
  7. added this to the v2.0 milestone on Feb 19, 2019
  8. olekscode commented on Feb 23, 2019

    @olekscode
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions