<div dir="ltr">All,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 5, 2016 at 11:46 AM, Francesc Alted <span dir="ltr"><<a href="mailto:faltet@gmail.com" target="_blank">faltet@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="gmail-">2016-10-05 8:45 GMT+02:00 srean <span dir="ltr"><<a href="mailto:srean.list@gmail.com" target="_blank">srean.list@gmail.com</a>></span>:<br></span><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Good discussion, but was surprised by the absence of numexpr in the discussion., given how relevant it (numexpr) is to the topic.</div><div><br></div><div>Is the goal to fold in the numexpr functionality (and beyond) into Numpy ?</div></div></blockquote><div><br></div></span><div>Yes, the question about merging numexpr into numpy has been something that periodically shows up in this list.  I think mostly everyone agree that it is a good idea, but things are not so easy, and so far nobody provided a good patch for this.  Also, the fact that numexpr relies on grouping an expression by using a string (e.g. (y = ne.evaluate("x**3 + tanh(x**2) + 4")) does not play well with the way in that numpy evaluates expressions, so something should be suggested to cope with this too.</div></div></div></div></blockquote><div><br></div><div>As Francesc said, Numexpr is going to get most of its power through grouping a series of operations so it can send blocks to the CPU cache and run the entire series of operations on the cache before returning the block to system memory.  If it was just used to back-end NumPy, it would only gain from the multi-threading portion inside each function call. I'm not sure how one would go about grouping successive numpy expressions without modifying the Python interpreter?  </div><div><br></div><div>I put a bit of effort into extending numexpr to use 4-byte word opcodes instead of 1-byte.  Progress has been very slow, however, due to time constraints, but I have most of the numpy data types (u[1-4], i[1-4], f[4,8], c[8,16], S[1-4], U[1-4]).  On Tuesday I finished writing a Python generator script that writes all the C-side opcode macros for opcodes.hpp.  Now I have about 900 opcodes, and this could easily grow into thousands if more functions are added, so I also built a reverse lookup tree (based on collections.defaultdict) for the Python-side of numexpr.</div><div><br></div></div><div>Robert</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Robert McLeod, Ph.D.<br>Center for Cellular Imaging and Nano Analytics (C-CINA)</div><div dir="ltr">Biozentrum der Universität Basel</div><div dir="ltr">Mattenstrasse 26, 4058 Basel<br>Work: +41.061.387.3225<br><a href="mailto:robert.mcleod@unibas.ch" target="_blank">robert.mcleod@unibas.ch</a></div><div dir="ltr"><span style="font-size:small"><a href="mailto:robert.mcleod@ethz.ch" target="_blank">robert.mcleod@bsse.ethz.ch</a></span></div><div><a href="mailto:robbmcleod@gmail.com" target="_blank">robbmcleod@gmail.com</a><br></div></div></div></div></div></div></div></div></div></div>
</div></div>