#8094: shortcuts for matrix transpose, complex conjugate, ...
------------------------------+---------------------------------------------
   Reporter:  schilly         |       Owner:  was       
       Type:  enhancement     |      Status:  needs_work
   Priority:  major           |   Milestone:  sage-4.3.2
  Component:  linear algebra  |    Keywords:            
     Author:                  |    Upstream:  N/A       
   Reviewer:                  |      Merged:            
Work_issues:                  |  
------------------------------+---------------------------------------------

Old description:

> The aim is to enhance {{{/sage/matrix/matrix*.pyx}}} files with a
> {{{__getattr__}}} mechanism to call {{{self.transpose()}}} and others
> more quickly. The attribute lookup mechanism provides a shortcut like
> {{{self.T}}} that is resolved to {{{self.transpose()}}}.
> Shortcuts should be similar to other environments like {{{numpy}}}.
>
> Additionally, {{{__setattr__}}} and {{{__delattr__}}} have to be
> implemented to avoid modification and deletion of these attributes.
>
> Notes: [http://docs.python.org/reference/datamodel.html#customizing-
> attribute-access python data model].

New description:

 The aim is to enhance the `/sage/matrix/matrix2.pyx` file
 witha`__getattr__`mechanismcython's properties to call `self.transpose()`
 and other methods more quickly. A shortcut like` self.T` is resolved
 to `self.transpose()`. Shortcuts should be similar to other environments
 like `numpy`.

 Additionally, `property __set__` and `__del__` have to be implemented to
 avoid modification and deletion of these attributes.

 Notes: [http://docs.python.org/reference/datamodel.html#customizing-
 attribute-access python data model],
 [http://docs.cython.org/docs/extension_types.html#properties Cython's
 properties]

--

Comment(by schilly):

 I thought that properties don't work in cython files, but yesterday I
 tried them (the decorator didn't work, but just the statement is fine) and
 they do. Thank's for the reference! I'll use them. The advantage is that
 then you have these shortcuts in autocomplete. It's also better to define
 them once and for all in matrix2.pyx - I think that's the best place?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8094#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to