Expression icon indicating copy to clipboard operation
Expression copied to clipboard

Working with Vectors and Matrixes

Open penacristian opened this issue 5 years ago • 1 comments

Are there any plans for vectors/matrixes compatibility? making this work: sin([1, 2, 3]) --> [0.8414, 0.9092, 0.1411]

Same for matrixes. Basically changing evaluate() -> Double to either evaluate<T>() -> T or evaluate() -> [Double]

penacristian avatar May 13 '19 11:05 penacristian

@penacristian you should be able to implement this yourself currently by providing custom operator implementations. The problem with making it part of the standard library is that + is currently used as a concatenate operator when dealing with arrays, so changing it to a memberwise addition would be a significant breaking change.

nicklockwood avatar May 18 '19 08:05 nicklockwood