Skip to content

Revise printing methods as they are not coherent #1056

Description

@albinahlback

Printing fmpz_mat and fmpq_mat gives the following

**fmpz_mat_print_pretty**
[[0 0 0]
[0 0 0]
[0 0 0]
]

**fmpz_mat_print**
3 3  0 0 0 0 0 0 0 0 0

**fmpq_mat_print**
<3 x 3 matrix over Q>
[0, 0, 0]
[0, 0, 0]
[0, 0, 0]

Some questions:

  • Should there be commas or not? I am fine with removing the commas in fmpq_mat.
  • fmpq_mat_print is quite nicely printed. Should we call this fmpq_mat_print_pretty and remove <n x n matrix over Q>?
  • Should an "ugly" version of printing for fmpq_mat be implemented, like the one for fmpz_mat?
  • Should there be double square brackets or not, like seen in fmpz_mat_print_pretty?
  • Should fmpz_mat_print_pretty print the last two brackets with a newline character in between?

Perhaps it goes for other types, I have not checked them out yet.

I suppose these are kind of breaking changes, but they need to be coherent at least (in my opinion).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions