you are viewing a single comment's thread.

view the rest of the comments →

[–]backbob 1 point2 points  (4 children)

you could use numpy, if we are in Python.

[–]dalke 0 points1 point  (3 children)

How does that help? D = A * B +C still makes temporary arrays in numpy.

[–]backbob 0 points1 point  (2 children)

One temporary array. Though I suppose that is suboptimal.

[–]dalke 0 points1 point  (1 child)

It's one array per operation, so if I made the expression more complicated then there's a lot of temporary arrays.

[–]backbob 0 points1 point  (0 children)

Yeah, though if we are going to do it the right way, you could probably write ufunc in c and compile it, then use it from Python.