Menu

#20 Vector operations

0.6.2
pending
aditsu
2015-07-04
2014-10-02
Dennis
No

Being able to vectorize operations would be useful quite frequently.

Since a . between an array and an operator currently has no meaning, we could borrow the syntax from Octave/MATLAB:

[1 2 3] [7 6 2] .+  " yields [8 8 5] ";

Preferably, vectorizing would work for all two-argument (and maybe three-) operators.

Discussion

  • aditsu

    aditsu - 2014-10-03

    I was already planning that for a future version, but I was thinking of using a "v" prefix. The dot might be a better idea, I'll consider it.

     
  • aditsu

    aditsu - 2015-02-22
    • status: open --> pending
    • assigned_to: aditsu
     
  • aditsu

    aditsu - 2015-02-22

    Implemented . with binary operators, will be released in 0.6.5.
    I'll think about ternary operators too.

     
  • aditsu

    aditsu - 2015-07-04

    How should it work with ternary operators when the arrays have different sizes?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.