
On 5/20/13 1:58 PM, St�fan van der Walt wrote:
On Mon, May 20, 2013 at 1:47 PM, Johannes Sch�nberger <jschoenberger@demuc.de> wrote:
Yes, exposure, edge detection, namely all functions that rely on basic array multiplication / ufuncs. I'm hesitant. The added dependency and code modification adds complexity, and I don't know how much improvement we will get. Could you do a benchmark of a typical function?
Yes, benchmarking is always a must before taking decisions like this. At any rate, you don't need to make a hard dependency of numexpr. This is what I typically do: try: import numexpr numexpr_ispresent = True except ImportError: numexpr_ispresent = False and then, in your code: if numexpr_ispresent: # you numexpr code here else: # your other code path here That means two code paths, which is a bit more complex, but still acceptable in many cases. -- Francesc Alted

I haven't watched below video, but after seeing the discussion, may be it will be useful : http://marakana.com/s/post/1105/2012_pydata_workshop_boosting_numpy_numbexpr... Abid K. opencvpython.blogspot.com On Mon, May 20, 2013 at 9:16 PM, Francesc Alted <francesc@continuum.io>wrote:
On 5/20/13 1:58 PM, Stéfan van der Walt wrote:
On Mon, May 20, 2013 at 1:47 PM, Johannes Schönberger <jschoenberger@demuc.de> wrote:
Yes, exposure, edge detection, namely all functions that rely on basic array multiplication / ufuncs.
I'm hesitant. The added dependency and code modification adds complexity, and I don't know how much improvement we will get. Could you do a benchmark of a typical function?
Yes, benchmarking is always a must before taking decisions like this. At any rate, you don't need to make a hard dependency of numexpr. This is what I typically do:
try: import numexpr numexpr_ispresent = True except ImportError: numexpr_ispresent = False
and then, in your code:
if numexpr_ispresent: # you numexpr code here else: # your other code path here
That means two code paths, which is a bit more complex, but still acceptable in many cases.
-- Francesc Alted
-- You received this message because you are subscribed to the Google Groups "scikit-image" group. To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe@**googlegroups.com<scikit-image%2Bunsubscribe@googlegroups.com> . For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> .
participants (2)
-
abid rahman
-
Francesc Alted