Verified Commit 560c979a authored by Sofus Albert Høgsbro Rose's avatar Sofus Albert Høgsbro Rose
Browse files

Fixed issue where lutFunc wouldn't vectorize a Python function over the array.

parent 282aea28
......@@ -41,8 +41,8 @@ class LUT(Transform) :
if dims == 1 :
lut = LUT(dims=dims, size=size, title=title, iRange=iRange)
#Use fast function sampling if the function is a C++ function.
vFunc = lambda arr: olo.gam(arr, func) if isinstance(func, types.BuiltinFunctionType) else np.vectorize(func, otypes=[np.float32])
#Use fast C++ function sampling if the function is a C++ function.
vFunc = lambda arr: olo.gam(arr, func) if isinstance(func, types.BuiltinFunctionType) else np.vectorize(func, otypes=[np.float32])(arr)
lut.array = vFunc(lut.array)
return lut
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment