Ticket #3920 (closed defect: fixed)

Opened 3 months ago

Last modified 2 months ago

[with patch, positive review] FiniteFieldElement.vector/matrix -> _vector_/_matrix_

Reported by: malb Assigned to: malb
Priority: minor Milestone: sage-3.2
Component: linear algebra Keywords:
Cc: robertwb

Description

While reading the Developer's guide update at #3905 it occurred to me that vector()/matrix() methods are supposed to be called _vector_/_matrix_() methods so that matrix(foo) works. The attached patch changes those functions for finite field elements.

Attachments

vector_matrix.patch (12.1 kB) - added by malb on 09/26/2008 09:33:27 AM.
10736.patch (0.8 kB) - added by jhpalmieri on 10/17/2008 02:25:55 PM.
apply after malb's patch

Change History

09/20/2008 09:00:20 AM changed by malb

  • owner changed from was to malb.
  • status changed from new to assigned.

09/26/2008 09:15:19 AM changed by jason

Just a short comment: could you put back in the matrix() and vector() functions and add a deprecation warning for now? That way code doesn't suddenly break.

09/26/2008 09:33:27 AM changed by malb

  • attachment vector_matrix.patch added.

10/17/2008 02:25:37 PM changed by jhpalmieri

Since you use "\code" in the docstring for vector and matrix, the docstrings need to start with r""" instead of """. Patch attached.

10/17/2008 02:25:55 PM changed by jhpalmieri

  • attachment 10736.patch added.

apply after malb's patch

10/17/2008 02:30:45 PM changed by jhpalmieri

  • summary changed from [with patch, needs review] FiniteFieldElement.vector/matrix -> _vector_/_matrix_ to [with patch, tentative positive review] FiniteFieldElement.vector/matrix -> _vector_/_matrix_.

Otherwise, your patch looks good to me. Now I finally know of an example of the _vector_ method -- I was looking for one when I was revising the Developer's guide...

I've doctested the changed files with complete success. I'm currently running sage -testall to make sure nothing else is screwed up by this. I'll give it a tentative positive review now while I'm thinking about it, then change it one way or the other depending on how the testing works out.

10/17/2008 03:55:24 PM changed by jhpalmieri

  • summary changed from [with patch, tentative positive review] FiniteFieldElement.vector/matrix -> _vector_/_matrix_ to [with patch, positive review] FiniteFieldElement.vector/matrix -> _vector_/_matrix_.

All tests passed!

10/18/2008 03:30:41 AM changed by mabshoff

Positive review on John's additional patch.

Cheers,

Michael

10/18/2008 03:33:54 AM changed by mabshoff

  • cc set to robertwb.

Robert: This patch touches

  • sage/rings/finite_field_givaro.pyx
  • sage/rings/finite_field_ntl_gf2e.pyx

Cheers,

Michael

10/18/2008 04:05:47 AM changed by mabshoff

  • status changed from assigned to closed.
  • resolution set to fixed.

Merged both patches in Sage 3.2.alpha0