[Numpy-discussion] Matlab page on scipy wiki

Colin J. Williams cjw at sympatico.ca
Mon Feb 13 19:41:06 EST 2006


Sasha wrote:

>Actually, what would be wrong with a single letter "c" or "r" for the
>concatenator?  NumPy already has one single-letter global identifier -
>"e", so it will not be against any naming standard.  I don't think
>either "c" or "r" will conflict with anything in the standard library.
> I would still prefer "c" because "r" is taken by RPy.
>  
>
It seems to me that a single letter would only be appropriate for a a 
function which has a very high frequency of use. I used M for the matrix 
constructor for my numarray based package.

Why not rowCat for row catenate or colCat for column catentate - I've 
never understood why concatentate is used more commonly.

Colin W.

>
>On 2/10/06, Sasha <ndarray at mac.com> wrote:
>  
>
>>To tell you the truth I dislike trailing underscore much more than the
>>choice of letter.  In my code I will probably be renaming all these
>>foo_ to delete the underscore foo_(...) or foo_[...] is way too ugly
>>for my taste.  However I fully admit that it is just a matter of taste
>>and it is trivial to rename things on import in Python.
>>
>>PS: Trailing underscore reminds me of C++ - the language that I
>>happily live without :-)
>>
>>On 2/10/06, Ryan Krauss <ryanlists at gmail.com> wrote:
>>    
>>
>>>The problem is that c_ at least used to mean "column concatenate" and
>>>concatenate is too long to type.
>>>
>>>On 2/10/06, Sasha <ndarray at mac.com> wrote:
>>>      
>>>
>>>>On 2/10/06, Travis Oliphant <oliphant at ee.byu.edu> wrote:
>>>>        
>>>>
>>>>>The whole point of r_ is to allow you to use slice notation to build
>>>>>ranges easily.  I wrote it precisely to make it easier to construct
>>>>>arrays in a simliar style that Matlab allows.
>>>>>          
>>>>>
>>>>Maybe it is just me, but r_ is rather unintuitive.  I would expect
>>>>something like this to be called "c" for "combine" or "concatenate."
>>>>This is the name used by S+ and R.
>>>>
>>>>From R manual:
>>>>"""
>>>>c                    package:base                    R Documentation
>>>>Combine Values into a Vector or List
>>>>...
>>>>Examples:
>>>>     c(1,7:9)
>>>>...
>>>>"""
>>>>
>>>>
>>>>-------------------------------------------------------
>>>>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>>>>for problems?  Stop!  Download the new AJAX search engine that makes
>>>>searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>>>>http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
>>>>_______________________________________________
>>>>Numpy-discussion mailing list
>>>>Numpy-discussion at lists.sourceforge.net
>>>>https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>>>>
>>>>        
>>>>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>for problems?  Stop!  Download the new AJAX search engine that makes
>searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
>_______________________________________________
>Numpy-discussion mailing list
>Numpy-discussion at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>
>  
>





More information about the NumPy-Discussion mailing list